Hi Everyone, for some application specific reasons, I need to execute a URL in opensmppbox.c. I have included urltrans.h and http.h and I am able to perform my required tasks. The problem is after the URL is executed and response is received, a PANIC occurs which I'm not able to fix. I took help from smsbox.c and http.c files while trying to write the code:
Here is my code to execute custom url: opensmppbox.c ---------------------------------------------------------------------------------------- Octstr *url; List *request_headers; url = octstr_duplicate(msg->sms.dlr_url); request_headers = http_create_empty_headers(); http_header_add(request_headers, "User-Agent", GW_NAME "/" GW_VERSION); if (t != 0) { if (urltrans_send_sender(t)) { http_header_add(request_headers, "X-Kannel-From", octstr_get_cstr(msg->sms.receiver)); } } caller = http_caller_create(); http_start_request(caller, HTTP_METHOD_GET, url, request_headers, NULL, 1, http_get_real, NULL); info(0, "URL executed successfully"); octstr_destroy(url); http_destroy_headers(request_headers); http_caller_destroy(caller); ------------------------------------------------------------------------------------------ Here is the error log: ------------------------------------------------------------------------------------------ 2014-05-01 09:20:06 [8403] [9] PANIC: gwlib/thread.c:125: mutex_lock_real: Assertion `mutex != NULL' failed. 2014-05-01 09:20:06 [8403] [9] PANIC: ./opensmppbox(gw_panic+0x147) [0x445797] 2014-05-01 09:20:06 [8403] [9] PANIC: ./opensmppbox(mutex_lock_real+0x10c) [0x45030c] 2014-05-01 09:20:06 [8403] [9] PANIC: ./opensmppbox(gwlist_append+0x19) [0x444ae9] 2014-05-01 09:20:06 [8403] [9] PANIC: ./opensmppbox() [0x43b371] 2014-05-01 09:20:06 [8403] [9] PANIC: ./opensmppbox() [0x43d3fe] 2014-05-01 09:20:06 [8403] [9] PANIC: /lib64/libpthread.so.0() [0x3b1ea079d1] 2014-05-01 09:20:06 [8403] [9] PANIC: /lib64/libc.so.6(clone+0x6d) [0x3b1e6e8b6d] ------------------------------------------------------------------------------------------ What am I doing wrong? Can anybody provide me any fix to this problem. Also, if you can advise me some other way to simply execute URL that would be great as well. Thanks in advance Sam