From 281b7c220b1d2c89f162a01775c6aa20b4ec3054 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Thu, 20 Sep 2007 13:55:36 +0000 Subject: [PATCH] minor addition to mmsbox_resolve interface --- mbuni/mmsbox/mmsbox_cfg.c | 2 +- mbuni/mmsbox/mmsbox_resolve.c | 3 ++- mbuni/mmsbox/mmsbox_resolve.h | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 212cb53..a91bfc8 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -495,7 +495,7 @@ Octstr *get_mmsbox_queue_dir(Octstr *from, List *to, MmscGrp *m, fto = r ? octstr_duplicate(r) : NULL; } - _mcid = rfs->mmsbox_resolve(from,fto,rfs_data, rfs_settings); + _mcid = rfs->mmsbox_resolve(from,fto,octstr_get_cstr(m->id), rfs_data, rfs_settings); if (_mcid == NULL || octstr_len(_mcid) == 0) { *mmc_id = NULL; diff --git a/mbuni/mmsbox/mmsbox_resolve.c b/mbuni/mmsbox/mmsbox_resolve.c index ce48832..13e36b0 100644 --- a/mbuni/mmsbox/mmsbox_resolve.c +++ b/mbuni/mmsbox/mmsbox_resolve.c @@ -25,7 +25,8 @@ static int _resolvermodule_fini(void *module_data) return 0; } -static Octstr *_resolve(Octstr * pfrom, Octstr *pto, void *module_data, void *settings_p) +static Octstr *_resolve(Octstr * pfrom, Octstr *pto, char *in_mmsc, + void *module_data, void *settings_p) { /* route normally to mms-service. */ return NULL; diff --git a/mbuni/mmsbox/mmsbox_resolve.h b/mbuni/mmsbox/mmsbox_resolve.h index 5133146..d14d3e6 100644 --- a/mbuni/mmsbox/mmsbox_resolve.h +++ b/mbuni/mmsbox/mmsbox_resolve.h @@ -29,10 +29,11 @@ typedef struct MmsBoxResolverFuncStruct { /* Looks up the sender and receiver msisdns and returns the ID of the MMC connection through which * the received message should be sent. - * + * Note: This function may modify sender and/or receive to match prefered usage. * Return NULL or the empty string to send the message to a service (normal behavior) */ - Octstr *(*mmsbox_resolve)(Octstr *pfrom, Octstr *pto, void *module_data, void *settings); + Octstr *(*mmsbox_resolve)(Octstr *pfrom, Octstr *pto, char *from_mmsc, + void *module_data, void *settings); int (*mmsbox_resolvermodule_fini)(void *module_data); } MmsBoxResolverFuncStruct;