From d06fa69106db32d82e3109b24372d2b85147a82c Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Tue, 18 Dec 2007 07:12:12 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/mmsbox/mmsbox_cfg.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 85ec972..581bfd6 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -31,7 +31,7 @@ Octstr *incoming_qdir, *outgoing_qdir, *dlr_dir; long mmsbox_maxsendattempts, mmsbox_send_back_off, default_msgexpiry; long maxthreads = 0; double queue_interval = -1; -Octstr *unified_prefix; +Octstr *unified_prefix = NULL; int mt_multipart = 0; MmsQueueHandlerFuncs *qfs; /* queue functions. */ MmsBoxResolverFuncStruct *rfs; /* resolver functions. */ @@ -125,7 +125,7 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func) - // unified_prefix = _mms_cfg_getx(grp, octstr_imm("unified-prefix")); + unified_prefix = _mms_cfg_getx(grp, octstr_imm("unified-prefix")); mms_cfg_get_int(grp, octstr_imm("sendmms-port"), &sendmms_port.port); #ifdef HAVE_LIBSSL @@ -514,12 +514,15 @@ Octstr *get_mmsbox_queue_dir(Octstr *from, List *to, MmscGrp *m, Octstr *fto = gwlist_extract_first(to); Octstr *xfrom = octstr_duplicate(from); - _mms_fixup_address(&xfrom, octstr_get_cstr(unified_prefix), 0); - _mms_fixup_address(&fto, octstr_get_cstr(unified_prefix), 0); + if (unified_prefix) + _mms_fixup_address(&xfrom, octstr_get_cstr(unified_prefix), 0); + if (unified_prefix) + _mms_fixup_address(&fto, octstr_get_cstr(unified_prefix), 0); _mcid = rfs->mmsbox_resolve(xfrom,fto,octstr_get_cstr(m->id), rfs_data, rfs_settings); - _mms_fixup_address(&fto, octstr_get_cstr(unified_prefix), 1); + if (unified_prefix) + _mms_fixup_address(&fto, octstr_get_cstr(unified_prefix), 1); if (fto) gwlist_insert(to, 0, fto); /* put it back, after modification. */ if (xfrom) {