X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/record-dvb/blobdiff_plain/9fbd8130d45c8218eaea28d13f7bf53de0bffa39..34d3d2846a69a1ae8c108e57e2539ac461b19328:/http.c diff --git a/http.c b/http.c index eee7345..ab798d9 100644 --- a/http.c +++ b/http.c @@ -91,8 +91,7 @@ int open_http(char *url) pos = buffer; while (*pos != 0) { - if (*pos == ' ') { - pos++; + if (*(pos++) == ' ') { if(strncmp("200", pos, 3)) { fprintf(stderr, "Wrong result-code: %s\n", buffer); return -1; @@ -100,7 +99,11 @@ int open_http(char *url) break; } } - pos++; + + if (*(++pos) == 0) { + fprintf(stderr, "Wrong answer from server: %s\n", buffer); + return -1; + } } }