[svn] commit: r3474 - in /branches/trac299/src: bin/xfrout/xfrout.py.in lib/xfr/fdshare_python.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Sat Nov 6 12:55:27 UTC 2010


Author: chenzhengzhang
Date: Sat Nov  6 12:55:27 2010
New Revision: 3474

Log:
fix comment and style

Modified:
    branches/trac299/src/bin/xfrout/xfrout.py.in
    branches/trac299/src/lib/xfr/fdshare_python.cc

Modified: branches/trac299/src/bin/xfrout/xfrout.py.in
==============================================================================
--- branches/trac299/src/bin/xfrout/xfrout.py.in (original)
+++ branches/trac299/src/bin/xfrout/xfrout.py.in Sat Nov  6 12:55:27 2010
@@ -81,7 +81,9 @@
 
     def handle(self):
         '''Handle a request until shutdown or xfrout client is closed.'''
-        # check self.server._shutdown_event to ensure the real shutdown comes
+        # check self.server._shutdown_event to ensure the real shutdown comes.
+        # Linux could trigger a spurious readable event on the _shutdown_sock 
+        # due to a bug, so we need perform a double check. 
         while not self.server._shutdown_event.is_set(): # Check if xfrout is shutdown
             try:
                 (rlist, wlist, xlist) = select.select([self._shutdown_sock, self.request], [], [])

Modified: branches/trac299/src/lib/xfr/fdshare_python.cc
==============================================================================
--- branches/trac299/src/lib/xfr/fdshare_python.cc (original)
+++ branches/trac299/src/lib/xfr/fdshare_python.cc Sat Nov  6 12:55:27 2010
@@ -24,7 +24,7 @@
 
 
 static PyObject*
-fdshare_recv_fd(PyObject *self UNUSED_PARAM, PyObject *args) {
+fdshare_recv_fd(PyObject* self UNUSED_PARAM, PyObject* args) {
     int sock, fd;
     if (!PyArg_ParseTuple(args, "i", &sock)) {
         return (NULL);
@@ -34,7 +34,7 @@
 }
 
 static PyObject*
-fdshare_send_fd(PyObject *self UNUSED_PARAM, PyObject *args) {
+fdshare_send_fd(PyObject* self UNUSED_PARAM, PyObject* args) {
     int sock, fd, result;
     if (!PyArg_ParseTuple(args, "ii", &sock, &fd)) {
         return (NULL);
@@ -64,12 +64,12 @@
 
 PyMODINIT_FUNC
 PyInit_libxfr_python(void) {
-    PyObject *mod = PyModule_Create(&bind10_fdshare_python);
+    PyObject* mod = PyModule_Create(&bind10_fdshare_python);
     if (mod == NULL) {
         return (NULL);
     }
 
-    PyObject *XFR_FD_RECEIVE_FAIL = Py_BuildValue("i", isc::xfr::XFR_FD_RECEIVE_FAIL);
+    PyObject* XFR_FD_RECEIVE_FAIL = Py_BuildValue("i", isc::xfr::XFR_FD_RECEIVE_FAIL);
     if (XFR_FD_RECEIVE_FAIL == NULL) {
         Py_XDECREF(mod);
         return (NULL);




More information about the bind10-changes mailing list