Back to index

webcit  8.12-dfsg
Defines | Functions
Core Server Functionality


#define GetServerStatus(a, b)   GetServerStatusMsg(a, b, 0, 0)
 to migrate old calls....


int GetServerStatusMsg (StrBuf *Line, long *FullState, int PutImportantMessage, int MajorOK)
 parse & check the server reply

Define Documentation

#define GetServerStatus (   a,
)    GetServerStatusMsg(a, b, 0, 0)

to migrate old calls....

Definition at line 25 of file tcp_sockets.h.

Function Documentation

int GetServerStatusMsg ( StrBuf *  Line,
long *  FullState,
int  PutImportantMessage,
int  MajorOK 

parse & check the server reply

Linethe line containing the server reply
FullStateif you need more than just the major number, this is returns it. Ignored if NULL.
PutImportantMessageif you want to forward the text part of the server reply to the user, specify 1; the result will be put into the 'Important Message' framework.
MajorOKin case of which major number not to put the ImportantMessage? 0 for all.
the most significant digit of the server status

Definition at line 500 of file serv_func.c.

       int rc;
       if (FullState != NULL)
              *FullState = StrTol(Line);
       rc = ChrPtr(Line)[0] - 48;
       if ((!PutImportantMessage) || 
           (MajorOK == rc)||
           (StrLength(Line) <= 4))
              return rc;

       AppendImportantMessage(ChrPtr(Line) + 4, StrLength(Line) - 4);
       return rc;

Here is the call graph for this function:

Here is the caller graph for this function: