浏览代码

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;
 }