*** empty log message ***
This commit is contained in:
parent
4f185a7032
commit
ab8828922d
|
@ -1,3 +1,8 @@
|
||||||
|
2009-10-14 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
* Added Billing info to mmssend (thanks to Vincent CHAVANIS <v.chavanis at telemaque.fr>)
|
||||||
|
* Fix for automake 1.1 (thanks to Vincent CHAVANIS <v.chavanis at telemaque.fr>)
|
||||||
|
* MMSC resolver module now takes two extra arguments: src interface (whence message received)
|
||||||
|
and ID of sender on that interface (e.g. vaspid)
|
||||||
2009-10-13 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2009-10-13 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
* Minor bug in mms_cfg.c -- get_bool fails if using pgsql for configs
|
* Minor bug in mms_cfg.c -- get_bool fails if using pgsql for configs
|
||||||
2009-09-08 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2009-09-08 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
|
|
@ -4,7 +4,9 @@ set -e
|
||||||
|
|
||||||
# Check for automake
|
# Check for automake
|
||||||
amvers="no"
|
amvers="no"
|
||||||
if automake-1.10 --version >/dev/null 2>&1; then
|
if automake-1.11 --version >/dev/null 2>&1; then
|
||||||
|
amvers="-1.11"
|
||||||
|
elif automake-1.10 --version >/dev/null 2>&1; then
|
||||||
amvers="-1.10"
|
amvers="-1.10"
|
||||||
elif automake-1.9 --version >/dev/null 2>&1; then
|
elif automake-1.9 --version >/dev/null 2>&1; then
|
||||||
amvers="-1.9"
|
amvers="-1.9"
|
||||||
|
|
|
@ -25,7 +25,8 @@ static int mms_resolvermodule_fini(void *module_data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Octstr *mms_resolve(Octstr * phonenum, void *module_data, void *settings_p, void *proxyrelays_p)
|
static Octstr *mms_resolve(Octstr * phonenum, char *src_int, char *src_id,
|
||||||
|
void *module_data, void *settings_p, void *proxyrelays_p)
|
||||||
{
|
{
|
||||||
/* Most custom implementations of this library will probably just ignore the two last arguments,
|
/* Most custom implementations of this library will probably just ignore the two last arguments,
|
||||||
* but this one needs them
|
* but this one needs them
|
||||||
|
|
|
@ -33,7 +33,8 @@ typedef struct MmsResolverFuncStruct {
|
||||||
*
|
*
|
||||||
* Return NULL on error, otherwise an Octstr
|
* Return NULL on error, otherwise an Octstr
|
||||||
*/
|
*/
|
||||||
Octstr *(*mms_resolve)(Octstr * phonenum, void *module_data, void *settings, void *proxyrelays);
|
Octstr *(*mms_resolve)(Octstr *phonenum, char *src_int, char *src_id,
|
||||||
|
void *module_data, void *settings, void *proxyrelays);
|
||||||
|
|
||||||
int (*mms_resolvermodule_fini)(void *module_data);
|
int (*mms_resolvermodule_fini)(void *module_data);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ static int mms_resolvermodule_fini(void *module_data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Octstr *mms_resolve(Octstr * phonenum, void *module_data, void *settings_p, void *proxyrelays_p)
|
static Octstr *mms_resolve(Octstr *phonenum, char *src_int, char *src_id,
|
||||||
|
void *module_data, void *settings_p, void *proxyrelays_p)
|
||||||
{
|
{
|
||||||
Octstr *s;
|
Octstr *s;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
@ -37,7 +38,9 @@ static Octstr *mms_resolve(Octstr * phonenum, void *module_data, void *settings_
|
||||||
if (script == NULL || octstr_len(script) == 0)
|
if (script == NULL || octstr_len(script) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
s = octstr_format("%s '%s' ", octstr_get_cstr(script), octstr_get_cstr(phonenum));
|
s = octstr_format("%s '%s' '%s' '%s'",
|
||||||
|
octstr_get_cstr(script), octstr_get_cstr(phonenum) ,
|
||||||
|
src_int ? src_int : "", src_id ? src_id : "");
|
||||||
fp = popen(octstr_get_cstr(s), "r");
|
fp = popen(octstr_get_cstr(s), "r");
|
||||||
octstr_destroy(s);
|
octstr_destroy(s);
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (xto && ttype == TPLMN) /* Get the home mmsc domain for this recipient. */
|
if (xto && ttype == TPLMN) /* Get the home mmsc domain for this recipient. */
|
||||||
home_mmsc = settings->mms_resolvefuncs->mms_resolve(xto,
|
home_mmsc = settings->mms_resolvefuncs->mms_resolve(xto,
|
||||||
|
"MM4", xproxy ? octstr_get_cstr(xproxy) : NULL,
|
||||||
settings->mms_resolver_module_data,
|
settings->mms_resolver_module_data,
|
||||||
settings, proxyrelays);
|
settings, proxyrelays);
|
||||||
if (!xto ||
|
if (!xto ||
|
||||||
|
|
|
@ -267,6 +267,8 @@ static int sendMsg(MmsEnvelope *e)
|
||||||
settings->strip_prefixes);
|
settings->strip_prefixes);
|
||||||
#endif
|
#endif
|
||||||
if ((mmsc = settings->mms_resolvefuncs->mms_resolve(phonenum,
|
if ((mmsc = settings->mms_resolvefuncs->mms_resolve(phonenum,
|
||||||
|
e->src_interface,
|
||||||
|
e->vaspid ? octstr_get_cstr(e->vaspid) : NULL,
|
||||||
settings->mms_resolver_module_data,
|
settings->mms_resolver_module_data,
|
||||||
settings, proxyrelays))) {
|
settings, proxyrelays))) {
|
||||||
mms_info(0, "MM2", NULL, "mmsc for \"%s\" resolved to: \"%s\"",
|
mms_info(0, "MM2", NULL, "mmsc for \"%s\" resolved to: \"%s\"",
|
||||||
|
|
|
@ -1911,8 +1911,9 @@ static void mm7proxy(void *unused)
|
||||||
h.ip ? octstr_get_cstr(h.ip) : "",
|
h.ip ? octstr_get_cstr(h.ip) : "",
|
||||||
h.vasp && h.vasp->id ? octstr_get_cstr(h.vasp->id) : "(null)");
|
h.vasp && h.vasp->id ? octstr_get_cstr(h.vasp->id) : "(null)");
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Dump headers, url etc. */
|
/* Dump headers, url etc. */
|
||||||
#if 1
|
|
||||||
http_header_dump(h.headers);
|
http_header_dump(h.headers);
|
||||||
if (h.body) octstr_dump(h.body, 0);
|
if (h.body) octstr_dump(h.body, 0);
|
||||||
if (h.ip) octstr_dump(h.ip, 0);
|
if (h.ip) octstr_dump(h.ip, 0);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
static Octstr *from;
|
static Octstr *from;
|
||||||
|
static Octstr *binfo;
|
||||||
static List *to;
|
static List *to;
|
||||||
static Octstr *data;
|
static Octstr *data;
|
||||||
static int savetommbox;
|
static int savetommbox;
|
||||||
|
@ -53,8 +54,14 @@ static int find_own(int i, int argc, char *argv[])
|
||||||
else if (argv[i][1] == 'r') {
|
else if (argv[i][1] == 'r') {
|
||||||
dlr = 1;
|
dlr = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (argv[i][1] == 'B')
|
||||||
|
if (i + 1 < argc) {
|
||||||
|
binfo = octstr_create(argv[i+1]);
|
||||||
|
return 1;
|
||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MmscSettings *settings;
|
static MmscSettings *settings;
|
||||||
|
@ -148,6 +155,10 @@ int main(int argc, char *argv[])
|
||||||
http_header_add(h, "X-Mbuni-Tool", "mmssend");
|
http_header_add(h, "X-Mbuni-Tool", "mmssend");
|
||||||
http_header_add(h, "X-Mbuni-CalledFrom", "Terminal");
|
http_header_add(h, "X-Mbuni-CalledFrom", "Terminal");
|
||||||
|
|
||||||
|
if (binfo) {
|
||||||
|
mms_info(0, "add.info", NULL, "Adding extra headers billing info `X-Mms-Binfo' :");
|
||||||
|
http_header_add(h, "X-Mms-Binfo", octstr_get_cstr(binfo));
|
||||||
|
}
|
||||||
s = settings->qfs->mms_queue_add(from, to, NULL, NULL, NULL, time(NULL),
|
s = settings->qfs->mms_queue_add(from, to, NULL, NULL, NULL, time(NULL),
|
||||||
time(NULL) + settings->default_msgexpiry, m,
|
time(NULL) + settings->default_msgexpiry, m,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
Loading…
Reference in New Issue