From d42d54a47776d5997b8725d2a96325e75c5b3051 Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Fri, 19 Feb 2016 17:37:20 -0500 Subject: [PATCH] netns: Trivial code reorganization. --- daemon/src/vcmdmodule.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/daemon/src/vcmdmodule.c b/daemon/src/vcmdmodule.c index 55503bce..ce180095 100644 --- a/daemon/src/vcmdmodule.c +++ b/daemon/src/vcmdmodule.c @@ -22,6 +22,23 @@ /* #define DEBUG */ +typedef struct vcmdentry { + PyObject_HEAD + + vnode_client_t *_client; + int _client_connected; +} VCmd; + +typedef struct { + PyObject_HEAD + + int32_t _cmdid; + int _complete; + int _status; + pthread_mutex_t _mutex; + pthread_cond_t _cv; +} VCmdWait; + int verbose; /* ev_default_loop(0) is not used because it interferes with SIGCHLD */ @@ -180,15 +197,6 @@ static int init_evloop(void) return 0; } -typedef struct { - PyObject_HEAD - - int32_t _cmdid; - int _complete; - int _status; - pthread_mutex_t _mutex; - pthread_cond_t _cv; -} VCmdWait; static PyObject *VCmdWait_new(PyTypeObject *type, PyObject *args, PyObject *kwds) @@ -309,13 +317,6 @@ static PyTypeObject vcmd_VCmdWaitType = { }; -typedef struct vcmdentry { - PyObject_HEAD - - vnode_client_t *_client; - int _client_connected; -} VCmd; - static PyObject *VCmd_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { VCmd *self;