Removed the 'room=' parameter from the wiki view. This functionality is provided...
[citadel.git] / webcit / pushemail.c
index 81b13fd67c8d24fbc023560626cd0921213998ee..2cdc91f53ea1287c44bc8de40f397b3160b03178 100644 (file)
@@ -20,6 +20,7 @@ void display_pushemail(void)
 
        /* Find any existing settings*/
        Buf = NewStrBuf();
+       memset(&Room, 0, sizeof(folder));
        if (goto_config_room(Buf, &Room) == 0) {
                int msgnum = 0;
                serv_puts("MSGS ALL|0|1");
@@ -28,7 +29,7 @@ void display_pushemail(void)
                        serv_puts("subj|__ Push email settings __");
                        serv_puts("000");
                        while (!Done &&
-                              StrBuf_ServGetln(Buf)) {
+                              StrBuf_ServGetln(Buf) >= 0) {
                                if ( (StrLength(Buf)==3) && 
                                     !strcmp(ChrPtr(Buf), "000")) {
                                        Done = 1;
@@ -44,7 +45,7 @@ void display_pushemail(void)
                        int i =0;
                        Done = 0;
                        while (!Done &&
-                              StrBuf_ServGetln(Buf)) {
+                              StrBuf_ServGetln(Buf) >= 0) {
                                if (( (StrLength(Buf)==3) && 
                                      !strcmp(ChrPtr(Buf), "000"))||
                                    ((StrLength(Buf)==4) && 
@@ -57,7 +58,7 @@ void display_pushemail(void)
                        if (!strcmp(ChrPtr(Buf), "text")) {
                                Done = 0;
                                while (!Done &&
-                                      StrBuf_ServGetln(Buf)) {
+                                      StrBuf_ServGetln(Buf) >= 0) {
                                        if ( (StrLength(Buf)==3) && 
                                             !strcmp(ChrPtr(Buf), "000")) {
                                                Done = 1;
@@ -80,13 +81,12 @@ void display_pushemail(void)
                        }
                }
                }
-               svput("SMSNUM", WCS_STRING, " ");
                serv_printf("GOTO %s", ChrPtr(WC->CurRoom.name));
                StrBuf_ServGetln(Buf);
                GetServerStatus(Buf, NULL);
        }
        FlushFolder(&Room);
-       output_headers(1, 1, 2, 0, 0, 0);
+       output_headers(1, 1, 1, 0, 0, 0);
        DoTemplate(HKEY("prefs_pushemail"), NULL, &SubTP);
        wDumpContent(1);
        FreeStrBuf(&Buf);
@@ -106,6 +106,7 @@ void save_pushemail(void)
                sms = bstr("user_sms_number");
        }
        Buf = NewStrBuf();
+       memset(&Room, 0, sizeof(folder));
        if (goto_config_room(Buf, &Room) != 0) {
                FreeStrBuf(&Buf);
                FlushFolder(&Room);
@@ -125,7 +126,7 @@ void save_pushemail(void)
        }
 
        while (!Done &&
-              StrBuf_ServGetln(Buf)) {
+              StrBuf_ServGetln(Buf) >= 0) {
                if ( (StrLength(Buf)==3) && 
                     !strcmp(ChrPtr(Buf), "000")) {
                        Done = 1;