Browse Source

utils: safe wrapper in case http status code is returned 0

- returning it will stop config processing, replace the return code with
  -1 in such case
Daniel-Constantin Mierla 9 years ago
parent
commit
afb5bb9996
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/utils/functions.c

+ 1 - 1
modules/utils/functions.c

@@ -228,5 +228,5 @@ int http_query(struct sip_msg* _m, char* _url, char* _dst, char* _post, char* _h
 
 
 	curl_easy_cleanup(curl);
 	curl_easy_cleanup(curl);
 	pkg_free(stream.buf);
 	pkg_free(stream.buf);
-	return stat;
+	return (stat!=0)?stat:-1;
 }
 }