]> code.citadel.org Git - citadel.git/blobdiff - webcit/serv_func.c
enhance GetServerStatus to GetServerStatusMsg; supply migration define
[citadel.git] / webcit / serv_func.c
index 2f6c8073526021482cc519ccfefdebf34c874b97..71d5d57daa6eafd1ab2fdf2c7560381e40aea209 100644 (file)
@@ -544,11 +544,19 @@ int read_server_text(StrBuf *Buf, long *nLines)
 }
 
 
-int GetServerStatus(StrBuf *Line, long* FullState)
+int GetServerStatusMsg(StrBuf *Line, long* FullState, int PutImportantMessage, int MajorOK)
 {
+       int rc;
        if (FullState != NULL)
                *FullState = StrTol(Line);
-       return ChrPtr(Line)[0] - 48;
+       rc = ChrPtr(Line)[0] - 48;
+       if ((!PutImportantMessage) || 
+           (MajorOK == rc)||
+           (StrLength(Line) <= 4))
+               return rc;
+
+       AppendImportantMessage(ChrPtr(Line) + 4, StrLength(Line) - 4);
+       return rc;
 }