if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
[citadel.git] / webcit / pushemail.c
index 82ee5682ac63c8985024e260405eb00c797669ce..6fdf455cdc665498d918d02c8f3a36254ebcb0a5 100644 (file)
@@ -29,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;
@@ -45,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) && 
@@ -58,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;
@@ -125,7 +125,7 @@ void save_pushemail(void)
        }
 
        while (!Done &&
-              StrBuf_ServGetln(Buf)) {
+              StrBuf_ServGetln(Buf) >= 0) {
                if ( (StrLength(Buf)==3) && 
                     !strcmp(ChrPtr(Buf), "000")) {
                        Done = 1;