minor fix to mmsbox
This commit is contained in:
parent
281b7c220b
commit
a87514cc02
|
@ -202,7 +202,6 @@ static void mm7soap_receive(MmsHTTPClientInfo *h)
|
|||
octstr_destroy(sx);
|
||||
}
|
||||
|
||||
|
||||
qf = qfs->mms_queue_add(from, to, subject,
|
||||
h->m->id, mmc_id,
|
||||
delivert, expiryt, m, linkedid,
|
||||
|
|
|
@ -485,17 +485,20 @@ Octstr *get_mmsbox_queue_dir(Octstr *from, List *to, MmscGrp *m,
|
|||
Octstr **mmc_id) {
|
||||
|
||||
if (m->reroute) {
|
||||
*mmc_id = octstr_duplicate(m->reroute_mmsc_id);
|
||||
*mmc_id = m->reroute_mmsc_id ? octstr_duplicate(m->reroute_mmsc_id) : NULL;
|
||||
return outgoing_qdir;
|
||||
} else {
|
||||
Octstr *_mcid, *fto = NULL, *qdir = NULL;
|
||||
Octstr *_mcid, *qdir = NULL;
|
||||
|
||||
if (gwlist_len(to) > 0) { /* we route based on first recipient XXX */
|
||||
Octstr *r = gwlist_get(to, 0);
|
||||
fto = r ? octstr_duplicate(r) : NULL;
|
||||
}
|
||||
Octstr *fto = gwlist_extract_first(to);
|
||||
|
||||
normalize_number(octstr_get_cstr(unified_prefix), &fto);
|
||||
_mcid = rfs->mmsbox_resolve(from,fto,octstr_get_cstr(m->id), rfs_data, rfs_settings);
|
||||
|
||||
_mcid = rfs->mmsbox_resolve(from,fto,octstr_get_cstr(m->id), rfs_data, rfs_settings);
|
||||
gwlist_insert(to, 0, fto); /* put it back, after modification. */
|
||||
} else
|
||||
_mcid = NULL;
|
||||
|
||||
if (_mcid == NULL || octstr_len(_mcid) == 0) {
|
||||
*mmc_id = NULL;
|
||||
|
@ -504,8 +507,9 @@ Octstr *get_mmsbox_queue_dir(Octstr *from, List *to, MmscGrp *m,
|
|||
*mmc_id = octstr_duplicate(_mcid);
|
||||
qdir = outgoing_qdir;
|
||||
}
|
||||
|
||||
octstr_destroy(_mcid);
|
||||
octstr_destroy(fto);
|
||||
|
||||
return qdir;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -30,7 +30,7 @@ static int _shell_resolvermodule_fini(void *module_data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static Octstr *_shell_resolve(Octstr *pfrom, Octstr *pto, void *module_data, void *settings_p)
|
||||
static Octstr *_shell_resolve(Octstr *pfrom, Octstr *pto, char *in_mmc, void *module_data, void *settings_p)
|
||||
{
|
||||
Octstr *s;
|
||||
FILE *fp;
|
||||
|
@ -39,8 +39,9 @@ static Octstr *_shell_resolve(Octstr *pfrom, Octstr *pto, void *module_data, voi
|
|||
if (script == NULL || octstr_len(script) == 0)
|
||||
return 0;
|
||||
|
||||
s = octstr_format("%s '%s' '%s' ",
|
||||
octstr_get_cstr(script), octstr_get_cstr(pfrom), octstr_get_cstr(pto));
|
||||
s = octstr_format("%s '%s' '%s' '%s'",
|
||||
octstr_get_cstr(script), octstr_get_cstr(pfrom), octstr_get_cstr(pto),
|
||||
in_mmc);
|
||||
fp = popen(octstr_get_cstr(s), "r");
|
||||
octstr_destroy(s);
|
||||
|
||||
|
|
Loading…
Reference in New Issue