From 30ed2d83f6b5d9ce516a946c8a24aef8caf9d681 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 14 Sep 2007 04:14:19 +0000 Subject: [PATCH] http-interface-name added --- mbuni/ChangeLog | 2 ++ mbuni/doc/userguide.shtml | 8 +++++--- mbuni/mmlib/mms_cfg.def | 2 +- mbuni/mmlib/mms_util.c | 6 ++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 727b8ba..ebdef46 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2007-09-14 P. A. Bagyenda + * Added http-interface-name config parameter 2007-09-06 P. A. Bagyenda * Added 'extras' directory, containing miscellaneous Mbuni addons. 2007-08-27 P. A. Bagyenda diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index bd43091..aee9d58 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -571,9 +571,10 @@ beginning of a new group with the given name.

The core group is core and defines the log file location, log level (amount of debugging information – the lower the number the more debugging -information), the location of the access log, the HTTP proxy -host/port if any (HTTP proxy host/port - is specified using the exact same parameters as used by Kannel.) and +information), the location of the access log, the HTTP interface to +listen on for incoming connections, HTTP proxy +host/port if any (HTTP proxy host/port and HTTP interface name + are specified using the exact same parameters as used by Kannel.) and SSL client and server certificate files to be used for incoming and outgoing HTTPS connections, if Kannel and Mbuni are compiled to have SSL enabled. The syntax for specifying SSL certificates is exactly as @@ -591,6 +592,7 @@ log-level = 0
access-log = log/access.log
+http-interface-name = "*"

diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index 94d5ec4..5d98c4a 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -36,7 +36,7 @@ SINGLE_GROUP(core, OCTSTR(ssl-server-cert-file) OCTSTR(ssl-server-key-file) OCTSTR(ssl-trusted-ca-file) - + OCTSTR(http-interface-name) ) SINGLE_GROUP(mbuni, diff --git a/mbuni/mmlib/mms_util.c b/mbuni/mmlib/mms_util.c index 878f1e5..db55512 100644 --- a/mbuni/mmlib/mms_util.c +++ b/mbuni/mmlib/mms_util.c @@ -38,6 +38,7 @@ int mms_load_core_settings(mCfgGrp *cgrp) { Octstr *log, *alog; Octstr *http_proxy_host; + Octstr *our_interface; long loglevel; if (cgrp == NULL) @@ -59,6 +60,11 @@ int mms_load_core_settings(mCfgGrp *cgrp) octstr_destroy(alog); } + if ((our_interface = mms_cfg_get(cgrp, octstr_imm("http-interface-name"))) != NULL) { + http_set_interface(our_interface); + octstr_destroy(our_interface); + } + /* look for http proxy. If set, use it. */ if ((http_proxy_host = mms_cfg_get(cgrp, octstr_imm("http-proxy-host"))) != NULL) {