From 6972fad0fe697396ed2cf7edb4276a7f3e1a4840 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 10 Mar 2006 05:38:29 +0000 Subject: [PATCH] - More graceful crash when config groups mbuni & core missing - Documentation fixes --- mbuni/configure.ac | 2 +- mbuni/doc/userguide.shtml | 32 +++++++------------------------- mbuni/mmlib/mms_util.c | 3 +++ mbuni/mmsbox/mmsbox_cfg.c | 3 +++ mbuni/mmsc/mmsc_cfg.c | 3 +++ 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/mbuni/configure.ac b/mbuni/configure.ac index 8270979..2e9649b 100644 --- a/mbuni/configure.ac +++ b/mbuni/configure.ac @@ -11,7 +11,7 @@ AC_PREREQ(2.59) AC_INIT([mbuni],[cvs],[devel@mbuni.org]) AC_CONFIG_SRCDIR([mmlib/mms_util.c]) AC_CONFIG_AUX_DIR(autotools) -AM_INIT_AUTOMAKE([mbuni],[1.0.0-cvs]) +AM_INIT_AUTOMAKE([mbuni],[cvs]) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE AC_CANONICAL_HOST diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index db9b297..666f3a0 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -403,34 +403,16 @@ gateway-1.4.0.tar.bz2 | tar xf -

The kannel -sources need to be patched for Mbuni using one of the supplied patch files from -the Mbuni downloads section given above. You can use either one of the patch -files:

+sources need to be patched for Mbuni using the supplied patch file from +the Mbuni downloads section given above. +

- +

mbuni-kannel-patch-full contains important updates to Kannel 1.4.0 that are now part of Kannel CVS. + (Mbuni still depends on the v1.4.0 release version.) +

-

Which patch you -choose is a matter of taste. Apply the patch like this

- +

Apply the patch as follows:

cd gateway-1.4.0
diff --git a/mbuni/mmlib/mms_util.c b/mbuni/mmlib/mms_util.c index da2eea9..fed3483 100644 --- a/mbuni/mmlib/mms_util.c +++ b/mbuni/mmlib/mms_util.c @@ -41,6 +41,9 @@ int mms_load_core_settings(mCfgGrp *cgrp) Octstr *http_proxy_host; long loglevel; + if (cgrp == NULL) + panic(0,"Missing required group `core' in config file!"); + /* Set the log file. */ log = mms_cfg_get(cgrp, octstr_imm("log-file")); if (log != NULL) { diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 36a0849..9a6e93c 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -44,6 +44,9 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func) int i, n; void *catchall = NULL; + if (grp == NULL) + panic(0,"Missing required group `mbuni' in config file!"); + mms_load_core_settings(cgrp); sendmms_users = list_create(); diff --git a/mbuni/mmsc/mmsc_cfg.c b/mbuni/mmsc/mmsc_cfg.c index 2c36c45..ccb7e25 100644 --- a/mbuni/mmsc/mmsc_cfg.c +++ b/mbuni/mmsc/mmsc_cfg.c @@ -75,6 +75,9 @@ MmscSettings *mms_load_mmsc_settings(mCfg *cfg, List **proxyrelays) memset(m, 0, sizeof *m); + if (grp == NULL) + panic(0,"Missing required group `mbuni' in config file!"); + mms_load_core_settings(cgrp); if (proxyrelays)