|
|
|
@ -320,32 +320,30 @@ static int sendNotify(MmsEnvelope *e)
|
|
|
|
|
if (mms_queue_update(e) == 1)
|
|
|
|
|
e = NULL; /* Queue entry gone. */
|
|
|
|
|
else
|
|
|
|
|
mms_queue_free_env(e);
|
|
|
|
|
|
|
|
|
|
mms_queue_free_env(e);
|
|
|
|
|
goto done;
|
|
|
|
|
} else if (send_ind == 0) { /* provisioned but does not support */
|
|
|
|
|
Octstr *s = octstr_format(octstr_get_cstr(settings->mms_notify_txt),
|
|
|
|
|
from);
|
|
|
|
|
List *pheaders;
|
|
|
|
|
Octstr *sto = octstr_duplicate(phonenum);
|
|
|
|
|
|
|
|
|
|
octstr_url_encode(s);
|
|
|
|
|
octstr_url_encode(sto);
|
|
|
|
|
|
|
|
|
|
url = octstr_format("%S&text=%S&to=%S",settings->sendsms_url,s, sto);
|
|
|
|
|
pheaders = http_create_empty_headers();
|
|
|
|
|
http_header_add(pheaders, "Connection", "close");
|
|
|
|
|
http_header_add(pheaders, "User-Agent", MM_NAME "/" GW_VERSION);
|
|
|
|
|
|
|
|
|
|
http_start_request(httpcaller, HTTP_METHOD_GET, url,
|
|
|
|
|
pheaders, NULL, 0, &edummy, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http_destroy_headers(pheaders);
|
|
|
|
|
octstr_destroy(url);
|
|
|
|
|
octstr_destroy(s);
|
|
|
|
|
octstr_destroy(sto);
|
|
|
|
|
|
|
|
|
|
if (s && octstr_len(s) > 0) { /* Only send if the string was set. */
|
|
|
|
|
List *pheaders;
|
|
|
|
|
Octstr *sto = octstr_duplicate(phonenum);
|
|
|
|
|
|
|
|
|
|
octstr_url_encode(s);
|
|
|
|
|
octstr_url_encode(sto);
|
|
|
|
|
|
|
|
|
|
url = octstr_format("%S&text=%S&to=%S",settings->sendsms_url,s, sto);
|
|
|
|
|
pheaders = http_create_empty_headers();
|
|
|
|
|
http_header_add(pheaders, "Connection", "close");
|
|
|
|
|
http_header_add(pheaders, "User-Agent", MM_NAME "/" VERSION);
|
|
|
|
|
|
|
|
|
|
http_start_request(httpcaller, HTTP_METHOD_GET, url,
|
|
|
|
|
pheaders, NULL, 0, &edummy, NULL);
|
|
|
|
|
http_destroy_headers(pheaders);
|
|
|
|
|
octstr_destroy(url);
|
|
|
|
|
octstr_destroy(sto);
|
|
|
|
|
} else if (s)
|
|
|
|
|
octstr_destroy(s);
|
|
|
|
|
res = MMS_SEND_OK;
|
|
|
|
|
err = octstr_imm("No MMS Ind support, sent SMS instead");
|
|
|
|
|
|
|
|
|
|