Various minor fixes

This commit is contained in:
Andreas Eversberg 2012-01-13 05:18:49 +01:00
parent 57a91e52d4
commit e9c834b844
6 changed files with 19 additions and 12 deletions

3
.gitignore vendored
View 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/

View File

@ -95,8 +95,8 @@ struct isdn_cause isdn_cause[128] = {
"" },
{ /*37*/ "",
"" },
{ /*38*/ "",
"" },
{ /*38*/ "Network out of order",
"Netz ausser Betrieb" },
{ /*39*/ "",
"" },
{ /*40*/ "",

View 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."},

10
main.c
View File

@ -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

View File

@ -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);

4
vbox.h
View File

@ -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: