* When entering a wiki room, display the wiki home page using the view render API...
[citadel.git] / webcit / messages.c
index 29eeef64fe45e8ea911f12753f0c666fc6a88b0e..8ca8a3126eb795451df86fec3f1e929c2e075dbc 100644 (file)
@@ -759,7 +759,7 @@ void readloop(long oper)
        void *vMsg;
        message_summary *Msg;
        char cmd[256] = "";
-       int i;
+       int i, r;
        wcsession *WCC = WC;
        HashPos *at;
        const char *HashKey;
@@ -790,11 +790,17 @@ void readloop(long oper)
                jsonMessageListHdr();
        }
 
-       switch(ViewMsg->GetParamsGetServerCall(
+       if (ViewMsg->GetParamsGetServerCall != NULL) {
+               r = ViewMsg->GetParamsGetServerCall(
                       &Stat,
                       &ViewSpecific,
                       oper,
-                      cmd, sizeof(cmd)))
+                      cmd, sizeof(cmd)
+               );
+       } else {
+               r = 0;
+       }
+       switch(r)
        {
        case 400:
        case 404: