소스 검색

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