"How are you" test for monit inserted
This commit is contained in:
11
conman.c
11
conman.c
@ -1864,6 +1864,15 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
|||||||
}
|
}
|
||||||
else
|
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 */
|
/* check for username and password */
|
||||||
pUser = strtok(pPtr," \t");
|
pUser = strtok(pPtr," \t");
|
||||||
pPassword = strtok(NULL," \t\r\n");
|
pPassword = strtok(NULL," \t\r\n");
|
||||||
@ -1886,7 +1895,7 @@ static void writeToLogFiles(SConnection *self, char *buffer)
|
|||||||
{
|
{
|
||||||
SCWrite(self,"ERROR: Bad login",eError);
|
SCWrite(self,"ERROR: Bad login",eError);
|
||||||
printf("Bad login string %s\n", pPtr);
|
printf("Bad login string %s\n", pPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(pPtr);
|
free(pPtr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user