From 40814480553dd7b605c414f1c5b2d2854d4b3c62 Mon Sep 17 00:00:00 2001 From: zolliker Date: Wed, 29 Mar 2006 14:57:13 +0000 Subject: [PATCH] "How are you" test for monit inserted --- conman.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/conman.c b/conman.c index c7661443..d3dbe7d7 100644 --- a/conman.c +++ b/conman.c @@ -1864,6 +1864,15 @@ static void writeToLogFiles(SConnection *self, char *buffer) } else { + /* response for monit check */ + if (strstr(pPtr,"How are you") == pPtr) + { + SCWrite(self,"I am fine",eError); + NetReadRemove(pServ->pReader,self->pSock); + self->iEnd = 1; + free(pPtr); + return 1; + } /* check for username and password */ pUser = strtok(pPtr," \t"); pPassword = strtok(NULL," \t\r\n"); @@ -1886,7 +1895,7 @@ static void writeToLogFiles(SConnection *self, char *buffer) { SCWrite(self,"ERROR: Bad login",eError); printf("Bad login string %s\n", pPtr); - } + } } free(pPtr); }