From c26a3d3e2431005be5338a3b6dca3e6ab3397b56 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Thu, 2 Oct 2008 13:49:07 +0000 Subject: [PATCH] vasp-id added --- mbuni/ChangeLog | 2 ++ mbuni/doc/userguide.shtml | 16 +++++++++++++++- mbuni/mmlib/mms_cfg.def | 1 + mbuni/mmsbox/bearerbox.c | 2 +- mbuni/mmsbox/mmsbox_cfg.c | 5 +++++ mbuni/mmsbox/mmsbox_cfg.h | 1 + 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 7333da9..c7bbc57 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2008-10-02 P. A. Bagyenda + * Added vasp-id param to mmsbox mmsc config (thanks to Christian Theil Have ) 2008-09-30 P. A. Bagyenda * Fix in mbuni management interface XML output 2008-09-29 P. A. Bagyenda diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index f1dd374..fab9186 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -2270,7 +2270,21 @@ Supported configuration parameters are: Mandatory: - Identifying name for this connection (used in logs for instance). For MM7 connections it also used as the VASP ID parameter + Identifying name for this connection (used in logs for instance). For MM7 connections it also used as the VASP ID parameter, when vasp-id is not specified. + + + + + + vasp-id + + + + String + + + Optional: + For MM7 connections it is used to explicitly set the VASP ID parameter. If left unspecified, the id is used instead. diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index a2e9df6..f4815b8 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -159,6 +159,7 @@ MULTI_GROUP(send-mms-user, MULTI_GROUP(mmsc, OCTSTR(id) OCTSTR(group-id) + OCTSTR(vasp-id) OCTSTR(mmsc-url) OCTSTR(incoming-username) OCTSTR(incoming-password) diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index 6e17529..fc30238 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -1016,7 +1016,7 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to, xto, transid, service_code, linkedid, - 1, octstr_get_cstr(mmc->id), xvasid, NULL, 0,/* UA N/A on this side. */ + 1, octstr_get_cstr(mmc->vasp_id), xvasid, NULL, 0,/* UA N/A on this side. */ distrib)) == NULL) { *error = octstr_format("Failed to convert Msg[%S] 2 SOAP message!", mms_message_type_to_string(mtype)); diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index a5693f2..059428c 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -528,6 +528,10 @@ MmscGrp *start_mmsc_from_conf(mCfg *cfg, mCfgGrp *x, gwthread_func_t *mmsc_handl m->group_id = mms_cfg_get(cfg, x, octstr_imm("group-id")); if (m->group_id == NULL) m->group_id = octstr_duplicate(m->id); + + m->vasp_id = mms_cfg_get(cfg, x, octstr_imm("vasp-id")); + if (m->vasp_id == NULL) + m->vasp_id = octstr_duplicate(m->id); m->mmsc_url = _mms_cfg_getx(cfg, x, octstr_imm("mmsc-url")); @@ -1094,6 +1098,7 @@ static void free_mmsc_struct (MmscGrp *m) octstr_destroy(m->id); octstr_destroy(m->group_id); + octstr_destroy(m->vasp_id); octstr_destroy(m->mmsc_url); octstr_destroy(m->incoming.user); diff --git a/mbuni/mmsbox/mmsbox_cfg.h b/mbuni/mmsbox/mmsbox_cfg.h index d2039ef..024c36f 100644 --- a/mbuni/mmsbox/mmsbox_cfg.h +++ b/mbuni/mmsbox/mmsbox_cfg.h @@ -23,6 +23,7 @@ typedef struct MmscGrp { Octstr *id; /* MMSC id (for logging). */ Octstr *group_id; /* GROUP MMSC id (used for qf). */ + Octstr *vasp_id; /* vasp id for SOAP mmsc */ Octstr *mmsc_url; /* URL at which MMSC can be reached. */ struct { Octstr *user, *pass;