Various minor fixes
authorAndreas Eversberg <jolly@eversberg.eu>
Fri, 13 Jan 2012 04:18:49 +0000 (05:18 +0100)
committerAndreas Eversberg <jolly@eversberg.eu>
Fri, 13 Jan 2012 04:18:49 +0000 (05:18 +0100)
.gitignore
cause.c
interface.c
main.c
vbox.cpp
vbox.h

index 570e576..c11c990 100644 (file)
@@ -4,12 +4,15 @@ core
 *.so
 *~
 *.orig
+conf*.dir
 stamp-h1
 .deps/
 Makefile
 config.h
 config.log
 config.status
+config.guess
+config.sub
 *.in
 aclocal.m4
 autom4te.cache/
diff --git a/cause.c b/cause.c
index 3b9ae8d..c1514da 100644 (file)
--- a/cause.c
+++ b/cause.c
@@ -95,8 +95,8 @@ struct isdn_cause isdn_cause[128] = {
                        "" },
        { /*37*/        "",
                        "" },
-       { /*38*/        "",
-                       "" },
+       { /*38*/        "Network out of order",
+                       "Netz ausser Betrieb" },
        { /*39*/        "",
                        "" },
        { /*40*/        "",
index cbfed2e..3c1a792 100644 (file)
@@ -1208,11 +1208,9 @@ struct interface_param interface_param[] = {
        {"gsm", &inter_gsm, "",
        ""},
        {"gsm-bs", &inter_gsm_bs, "",
-       "Sets up GSM base station interface for using OpenBSC.\n"
-       "See the default/gsm.conf for configuration for this version."},
-       {"gsm-ms", &inter_gsm_ms, "[<socket>]",
+       "Sets up GSM base station interface for using OpenBSC."},
+       {"gsm-ms", &inter_gsm_ms, "<socket>",
        "Sets up GSM mobile station interface for using Osmocom-BB.\n"
-       "See the default/gsm.conf for configuration for this version.\n"
        "The name of the MS folows the interface name.\n"
        "The socket is /tmp/osmocom_l2 by default and need to be changed when multiple\n"
        "MS interfaces are used."},
diff --git a/main.c b/main.c
index 6e91207..84f357f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -149,6 +149,11 @@ void sighandler(int sigset)
                return;
        fprintf(stderr, "LCR: Signal received: %d\n", sigset);
        PDEBUG(DEBUG_LOG, "Signal received: %d\n", sigset);
+       /* reset signals */
+       signal(SIGINT,SIG_DFL);
+       signal(SIGHUP,SIG_DFL);
+       signal(SIGTERM,SIG_DFL);
+       signal(SIGPIPE,SIG_DFL);
        if (!quit) {
                quit = sigset;
                /* set scheduler & priority */
@@ -180,6 +185,7 @@ int main(int argc, char *argv[])
                                created_misdn = 0;
        char                    tracetext[256], lock[128];
        char                    options_error[256];
+       int                     polling = 0;
 
 #if 0
        /* init fdset */
@@ -260,6 +266,7 @@ int main(int argc, char *argv[])
                PERROR("%s", options_error);
                goto free;
        }
+       polling = options.polling;
 
        /* init mISDN */
        if (mISDN_initialize() < 0)
@@ -472,8 +479,9 @@ init is done when interface is up
                }
 #else
                if (options.polling) {
-                       if (!select_main(1, NULL, NULL, NULL))
+                       if (!select_main(1, NULL, NULL, NULL)) {
                                usleep(10000);
+                       }
                } else
                        select_main(0, NULL, NULL, NULL);
 #endif
index bc2c369..28daf09 100644 (file)
--- a/vbox.cpp
+++ b/vbox.cpp
@@ -237,7 +237,6 @@ int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union param
                /* recording is close during destruction */
                delete this;
                return(-1); /* must return because port is gone */
-               break;
 
                case MESSAGE_RELEASE: /* release vbox port */
                vbox_trace_header(this, "RELEASE to VBox", DIRECTION_OUT);
@@ -249,7 +248,6 @@ int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union param
                /* recording is close during destruction */
                delete this;
                return(-1); /* must return because port is gone */
-               break;
 
                case MESSAGE_SETUP: /* dial-out command received from epoint, answer with connect */
                /* get apppbx */
@@ -321,7 +319,7 @@ int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union param
                        vbox_trace_header(this, "RECORDING", DIRECTION_IN);
                        end_trace();
                }
-               break;
+               return(1);
 
                default:
                PDEBUG(DEBUG_VBOX, "PORT(%s) vbox port with (caller id %s) received an unsupported message: %d\n", p_name, p_callerinfo.id, message_id);
diff --git a/vbox.h b/vbox.h
index ac9ccfb..dd9d4aa 100644 (file)
--- a/vbox.h
+++ b/vbox.h
@@ -5,11 +5,11 @@
 **---------------------------------------------------------------------------**
 ** Copyright: Andreas Eversberg                                              **
 **                                                                           **
-** port header file                                                          **
+** vbox-port header file                                                     **
 **                                                                           **
 \*****************************************************************************/ 
 
-/* answerin machine port class */
+/* answering machine port class */
 class VBoxPort : public Port
 {
        public: