* More logging. Also display an error to the user if we get a citserver greeting...
authorArt Cancro <ajc@citadel.org>
Wed, 2 Jun 2010 16:54:28 +0000 (16:54 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 2 Jun 2010 16:54:28 +0000 (16:54 +0000)
webcit/serv_func.c

index 3b8655f068c0e4726a3e8a38667bc719b63ddedf..1069858e5cba8790404ea69bfd02a5167547f24c 100644 (file)
@@ -182,6 +182,7 @@ int GetConnected (void)
                WCC->connected = 1;
                StrBuf_ServGetln(Buf);  /* get the server greeting */
                short_status = GetServerStatus(Buf, &Status);
+               lprintf(9, "\033[32mGREETING: %s\033[0m\n", ChrPtr(Buf));
                FreeStrBuf(&Buf);
 
                /* Server isn't ready for us? */
@@ -214,8 +215,9 @@ int GetConnected (void)
                        }
                        locate_host(WCC->Hdr->HR.browser_host, WCC->Hdr->http_sock);
                }
-               if (WCC->serv_info == NULL)
+               if (WCC->serv_info == NULL) {
                        WCC->serv_info = get_serv_info(WCC->Hdr->HR.browser_host, WCC->Hdr->HR.user_agent);
+               }
                if (WCC->serv_info == NULL){
                        begin_burst();
                        wc_printf(_("Received unexpected answer from Citadel server; bailing out."));