added params to prov notify script
This commit is contained in:
parent
d7d97c695d
commit
8124439d44
|
@ -1,3 +1,5 @@
|
|||
2007-08-08 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||
* Added User-Agent and UAProf URL arguments to call to prov-notify script in MMC.
|
||||
2007-08-06 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||
* Fix for DLR reporting in mmsbox (thanks to Skycore team)
|
||||
* UACapabilities support for MM7/SOAP v6.x (thanks again to Skycore Team)
|
||||
|
|
|
@ -99,10 +99,6 @@ This document describes the installation and usage of the MMS Gateway.
|
|||
|
||||
<H3><!--TableOfContentsAnchor:Begin--><A NAME="Section_.1.1"></A><!--TableOfContentsAnchor:End-->Chapter 1: Introduction</H3>
|
||||
|
||||
<p>
|
||||
This chapter provides an overview of MMS
|
||||
(short for Multimedia Messaging Service) and the Mbuni MMS Gateway.
|
||||
</p>
|
||||
|
||||
<p>MMS offers mobile
|
||||
users enhanced messaging capabilities like the ability to send pictures and
|
||||
|
|
|
@ -582,26 +582,37 @@ int mms_ind_send(Octstr *prov_cmd, Octstr *to)
|
|||
return res;
|
||||
}
|
||||
|
||||
void notify_prov_server(char *cmd, char *from, char *event, char *arg, Octstr *msgid)
|
||||
void notify_prov_server(char *cmd, char *from, char *event, char *arg, Octstr *msgid,
|
||||
Octstr *ua, Octstr *uaprof)
|
||||
{
|
||||
Octstr *s;
|
||||
Octstr *tmp, *tmp2;
|
||||
Octstr *tmp, *tmp2, *tmp3, *tmp4;
|
||||
|
||||
if (cmd == NULL || cmd[0] == '\0')
|
||||
return;
|
||||
tmp = octstr_create(from);
|
||||
|
||||
gw_assert(from);
|
||||
gw_assert(cmd);
|
||||
gw_assert(event);
|
||||
|
||||
tmp = octstr_create(from);
|
||||
tmp2 = msgid ? octstr_duplicate(msgid) : octstr_create("");
|
||||
tmp3 = ua ? octstr_duplicate(ua) : octstr_create("");
|
||||
tmp4 = uaprof ? octstr_duplicate(uaprof) : octstr_create("");
|
||||
|
||||
escape_shell_chars(tmp);
|
||||
|
||||
tmp2 = msgid ? octstr_duplicate(msgid) : octstr_create("");
|
||||
escape_shell_chars(tmp2);
|
||||
escape_shell_chars(tmp3);
|
||||
escape_shell_chars(tmp4);
|
||||
|
||||
s = octstr_format("%s '%s' '%s' '%s' '%s'", cmd, event,
|
||||
octstr_get_cstr(tmp), arg, octstr_get_cstr(tmp2));
|
||||
s = octstr_format("%s '%s' '%S' '%s' '%S' '%S' '%S'", cmd, event,
|
||||
tmp, arg, tmp2, tmp3, tmp4);
|
||||
|
||||
system(octstr_get_cstr(s));
|
||||
|
||||
octstr_destroy(s);
|
||||
octstr_destroy(tmp);
|
||||
octstr_destroy(tmp2);
|
||||
|
||||
if (s) {
|
||||
system(octstr_get_cstr(s));
|
||||
octstr_destroy(s);
|
||||
}
|
||||
octstr_destroy(tmp3);
|
||||
octstr_destroy(tmp4);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,8 @@ extern int mms_decodefetchurl(Octstr *fetch_url,
|
|||
Octstr **qf, Octstr **token, int *loc);
|
||||
Octstr *mms_find_sender_ip(List *request_hdrs, Octstr *ip_header, Octstr *ip, int *isv6);
|
||||
|
||||
void notify_prov_server(char *cmd, char *from, char *event, char *arg, Octstr *msgid);
|
||||
void notify_prov_server(char *cmd, char *from, char *event, char *arg, Octstr *msgid,
|
||||
Octstr *ua, Octstr *uaprof);
|
||||
int mms_ind_send(Octstr *prov_cmd, Octstr *to);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -452,7 +452,7 @@ static int sendNotify(MmsEnvelope *e)
|
|||
to ? octstr_get_cstr(to) : "unknown",
|
||||
prov_notify_event,
|
||||
rtype ? rtype : "",
|
||||
e ? e->msgId : NULL);
|
||||
e ? e->msgId : NULL, NULL, NULL);
|
||||
|
||||
if (msg) mms_destroy(msg);
|
||||
if (phonenum)
|
||||
|
|
|
@ -416,7 +416,8 @@ void fetchmms_proxy(MmsHTTPClientInfo *h)
|
|||
if (notify_cmd) /* Inform provisioning server */
|
||||
notify_prov_server(octstr_get_cstr(settings->prov_notify),
|
||||
h->base_client_addr ? octstr_get_cstr(h->base_client_addr) : "unknown",
|
||||
notify_cmd, notify_arg ? notify_arg : "", e ? e->msgId : NULL);
|
||||
notify_cmd, notify_arg ? notify_arg : "", e ? e->msgId : NULL,
|
||||
h->ua, h->profile_url);
|
||||
|
||||
|
||||
http_destroy_headers(rh);
|
||||
|
@ -1445,27 +1446,15 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
|||
reply_body = mms_tobinary(mresp);
|
||||
notify_cmd = "deleted";
|
||||
|
||||
if (xflags)
|
||||
gwlist_destroy(xflags, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
if (xstates)
|
||||
gwlist_destroy(xstates, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
if (required_headers)
|
||||
gwlist_destroy(required_headers, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
|
||||
if (msgrefs)
|
||||
gwlist_destroy(msgrefs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
|
||||
if (msglocs)
|
||||
gwlist_destroy(msglocs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
|
||||
if (msgs)
|
||||
gwlist_destroy(msgs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
|
||||
if (otherhdrs)
|
||||
http_destroy_headers(otherhdrs);
|
||||
|
||||
if (otransid)
|
||||
octstr_destroy(otransid);
|
||||
|
||||
gwlist_destroy(xflags, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
gwlist_destroy(xstates, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
gwlist_destroy(required_headers, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
gwlist_destroy(msgrefs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
gwlist_destroy(msglocs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
gwlist_destroy(msgs, (gwlist_item_destructor_t *)octstr_destroy);
|
||||
http_destroy_headers(otherhdrs);
|
||||
octstr_destroy(otransid);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1482,7 +1471,8 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
|||
notify_prov_server(octstr_get_cstr(settings->prov_notify),
|
||||
h->base_client_addr ? octstr_get_cstr(h->base_client_addr) : "unknown",
|
||||
notify_cmd,
|
||||
"", NULL);
|
||||
"", NULL,
|
||||
h->ua, h->profile_url);
|
||||
|
||||
mms_destroy(m);
|
||||
/* Send reply. */
|
||||
|
|
Loading…
Reference in New Issue