From 3e6f552a5ffd7c51a9ea161ed0706e7ff87bd601 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Mon, 8 May 2006 13:25:02 +0000 Subject: [PATCH] further improvements to detokenizer module usage - send request IP only to module if token missing --- mbuni/mmsc/mmsc_cfg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mbuni/mmsc/mmsc_cfg.c b/mbuni/mmsc/mmsc_cfg.c index 892fee9..d5c05be 100644 --- a/mbuni/mmsc/mmsc_cfg.c +++ b/mbuni/mmsc/mmsc_cfg.c @@ -405,10 +405,10 @@ Octstr *mms_find_sender_msisdn(Octstr *send_url, requestip_header); if (xip == NULL) xip = ip ? octstr_duplicate(ip) : NULL; - if (l && list_len(l) > 1) { - if (detokenizerfuncs) - phonenum = detokenizerfuncs->mms_detokenize(list_get(l, list_len(l) - 1), xip); - } + if (detokenizerfuncs && ((l && list_len(l) > 1) || xip)) + phonenum = detokenizerfuncs->mms_detokenize((l && list_len(l) > 1) ? + list_get(l, list_len(l) - 1) : octstr_imm("x"), + xip); if (l) list_destroy(l, (list_item_destructor_t *)octstr_destroy); if (xip)