Преглед на файлове

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 години
родител
ревизия
afb5bb9996
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);
 	pkg_free(stream.buf);
-	return stat;
+	return (stat!=0)?stat:-1;
 }