From 3100e12b6a820e39af1fee6d4a403ffc923b4c42 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Mon, 26 Feb 2007 21:03:23 +0000 Subject: [PATCH] updated usage updated sample config git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@245 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/sems.conf.sample | 9 ++++---- core/sems.cpp | 48 ++----------------------------------------- 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/core/sems.conf.sample b/core/sems.conf.sample index 956781a8..1593df13 100644 --- a/core/sems.conf.sample +++ b/core/sems.conf.sample @@ -87,18 +87,17 @@ rtp_high_port=60000 # value media_processor_threads=1 -# optional parameter: listen= +# optional parameter: listen=| # # - this informs SEMS about the interface where its SER is # bound to. SEMS needs this information to correctly set # the contact header in outgoing calls and registrations. # Should be set to equal the 'listen' configuration option # in ser_sems.cfg. -# This does not need to be set if outgoing calls and -# registrations from SEMS are not used. # If not set, this defaults to the interface SEMS binds to. -# -# listen=10.0.0.34 +# Examples: +# listen=10.0.0.34 +# listen=eth0 # optional parameter: sip_port= # diff --git a/core/sems.cpp b/core/sems.cpp index 95d078c9..63828708 100644 --- a/core/sems.cpp +++ b/core/sems.cpp @@ -207,46 +207,6 @@ static int use_args(char* progname, map& args) return 0; } -AmFifoCtrlInterface* init_fifo(const string& path) -{ - AmFifoCtrlInterface* ctrl = new AmFifoCtrlInterface(); - - if(ctrl->createFifo(path)) - goto fifo_error; - - // avoid the FIFO reaches EOF... - if((child_pid=fork())>0){ - int fifo_write=0; - if((fifo_write=open(path.c_str(), O_WRONLY)) == -1){ - ERROR("while opening fifo `%s': %s\n", - path.c_str(),strerror(errno)); - kill(child_pid,SIGTERM); - } - waitpid(child_pid,0,0); - if(fifo_write != -1) - ::close(fifo_write); - - exit(0); - } - // the main process is waiting - // for that child to terminate - is_main = 0; - - if(ctrl->init(path)) - goto fifo_error; - - goto fifo_end; - - fifo_error: - delete ctrl; - ctrl = 0; - - fifo_end: - return ctrl; -} - - - int main(int argc, char* argv[]) { map args; @@ -470,20 +430,16 @@ static void print_usage(char* progname) "USAGE: %s [options]\n" " Options:\n" " -f config_filename: sets configuration file to use\n" - " -i fifo_name: path and file name of our fifo file.\n" - " -o ser_fifo_name: path and file name of Ser's fifo file.\n" " -d device: sets network device for media advertising\n" " -P pid_file: write a pid file.\n" " -u uid: set user id.\n" " -g gid: set group id.\n" - " -x plugin_path: root path for plugins\n" + " -x plugin_path: path for plugins\n" " -D log_level: sets log level (error=0, warning=1, info=2, debug=3).\n" " -E : debug mode: do not fork and log to stderr.\n" " -v : version.\n" " -h : this help screen.\n" - "\n" - " Notes:\n" - " * plug-ins are searched in plugin_path/{apps,audio}/*.so.\n", + "\n", progname ); }