X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/record-dvb/blobdiff_plain/9fbd8130d45c8218eaea28d13f7bf53de0bffa39..4710a9f88a22ea44ad4ec216e6c379783e1079e3:/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; + } } }