From c5a2a2d8ad1e3c902384b479fb24c3bfba7508d1 Mon Sep 17 00:00:00 2001 From: Carlos Daniel Ruvalcaba Valenzuela Date: Sat, 22 Sep 2007 23:29:06 -0700 Subject: [PATCH] Code formating correction (tabs) on queue manager --- backends/queue/queueman.cpp | 51 ++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/backends/queue/queueman.cpp b/backends/queue/queueman.cpp index 2411cda..90a5791 100644 --- a/backends/queue/queueman.cpp +++ b/backends/queue/queueman.cpp @@ -28,22 +28,22 @@ with this program; if not, write to the Free Software Foundation, Inc., #include int knhash(char v){ - if ((v >= 65) && (v <= 90)) - return v - 65; + if ((v >= 65) && (v <= 90)) + return v - 65; - if (v == 95) - return 26; - - if ((v >= 97) && (v <= 122)) - return v - 97; - - if (v == ' ') - return -1; + if (v == 95) + return 26; + + if ((v >= 97) && (v <= 122)) + return v - 97; + + if (v == ' ') + return -1; - if (v == 0x0D) - return -1; - - return 255; + if (v == 0x0D) + return -1; + + return 255; } /* TODO: Change to state based machine, add error handling */ @@ -52,7 +52,7 @@ class QueueHandler : public ProtocolHandler{ queue msg_queue; /* Message Queue */ char path[100]; public: - QueueHandler(const char *qpath, const char *name){ + QueueHandler(const char *qpath, const char *name){ /* Initialize Queue Path */ sprintf(path, "%s/%s/", qpath, name); @@ -60,21 +60,21 @@ public: qlock.Post(); } - int Handle(Socket *s){ - char buffer[255], *queue_name; - int onrun, r, ret; + int Handle(Socket *s){ + char buffer[255], *queue_name; + int onrun, r, ret; IPC *ipc; IPCMessage *msg; time_t ctime; struct tm *gtime; string *slot; - + onrun = 1; /* Start IPC in the socket */ ipc = new SocketIPC(s); - while (onrun){ + while (onrun){ /* Get our message */ msg = ipc->ReciveMessage(); @@ -143,11 +143,14 @@ public: }else if (!strcmp(msg->GetMessageName(), "quit")){ /* End Session */ onrun = 0; + }else if (!strcmp(msg->GetMessageName(), "subscribe")){ + }else if (!strcmp(msg->GetMessageName(), "unsubscribe")){ } - } - s->Close(); - return 0; - } + } + s->Close(); + + return 0; + } }; class SimpleLoad : public LoadHandler { -- 2.11.4.GIT