Module: kamailio
Branch: master
Commit: afb5bb99960d951217c6c94465cda92b10394e1a
URL:
https://github.com/kamailio/kamailio/commit/afb5bb99960d951217c6c94465cda92…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-06-27T11:35:34+02:00
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
---
Modified: modules/utils/functions.c
---
Diff:
https://github.com/kamailio/kamailio/commit/afb5bb99960d951217c6c94465cda92…
Patch:
https://github.com/kamailio/kamailio/commit/afb5bb99960d951217c6c94465cda92…
---
diff --git a/modules/utils/functions.c b/modules/utils/functions.c
index 5de92ad..58f23cb 100644
--- a/modules/utils/functions.c
+++ b/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;
}