summaryrefslogtreecommitdiffstats
path: root/mISDN.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2010-01-15 21:55:25 +0100
committerAndreas Eversberg2010-01-15 21:55:25 +0100
commit473d6569efcad130f9a5044b182b75a1c07a1eee (patch)
tree6bb2fdb9f19624f56afe87c7f55fa7dc6d06c24a /mISDN.cpp
parentNew version 1.7 (diff)
downloadlcr-473d6569efcad130f9a5044b182b75a1c07a1eee.tar.gz
lcr-473d6569efcad130f9a5044b182b75a1c07a1eee.tar.xz
lcr-473d6569efcad130f9a5044b182b75a1c07a1eee.zip
Added new option to interface.conf: "nonotify" to disable notify messages.
modified: README modified: dss1.cpp modified: interface.c modified: interface.h modified: mISDN.cpp modified: mISDN.h
Diffstat (limited to 'mISDN.cpp')
-rw-r--r--mISDN.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/mISDN.cpp b/mISDN.cpp
index ce885d9..e531b14 100644
--- a/mISDN.cpp
+++ b/mISDN.cpp
@@ -2045,10 +2045,17 @@ int mISDN_getportbyname(int sock, int cnt, char *portname)
/*
* global function to add a new card (port)
*/
-struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt, int te_special, int l1hold, int l2hold, struct interface *interface, int gsm, unsigned int ss5)
+struct mISDNport *mISDNport_open(struct interface_port *ifport)
{
int ret;
struct mISDNport *mISDNport, **mISDNportp;
+ int port = ifport->portnum;
+ int ptp = ifport->ptp;
+ int force_nt = ifport->nt;
+ int l1hold = ifport->l1hold;
+ int l2hold = ifport->l2hold;
+ int gsm = ifport->gsm;
+ int ss5 = ifport->ss5;
int i, cnt;
int pri, bri, pots;
int nt, te;
@@ -2068,12 +2075,12 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt
return(NULL);
}
if (port < 0) {
- port = mISDN_getportbyname(mISDNsocket, cnt, portname);
+ port = mISDN_getportbyname(mISDNsocket, cnt, ifport->portname);
if (port < 0) {
if (gsm)
- PERROR_RUNTIME("Port name '%s' not found, did you load loopback interface for GSM?.\n", portname);
+ PERROR_RUNTIME("Port name '%s' not found, did you load loopback interface for GSM?.\n", ifport->portname);
else
- PERROR_RUNTIME("Port name '%s' not found, use 'misdn_info' tool to list all existing ports.\n", portname);
+ PERROR_RUNTIME("Port name '%s' not found, use 'misdn_info' tool to list all existing ports.\n", ifport->portname);
return(NULL);
}
// note: 'port' has still the port number
@@ -2275,7 +2282,7 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt
mqueue_purge(&mISDNport->upqueue);
PERROR_RUNTIME("open_layer3() failed for port %d\n", port);
start_trace(port,
- interface,
+ ifport->interface,
NULL,
NULL,
DIRECTION_NONE,
@@ -2292,7 +2299,7 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt
mISDNport->b_num = devinfo.nrbchan;
mISDNport->portnum = port;
mISDNport->ntmode = nt;
- mISDNport->tespecial = te_special;
+ mISDNport->tespecial = ifport->tespecial;
mISDNport->pri = pri;
mISDNport->ptp = ptp;
mISDNport->l1hold = l1hold;
@@ -2322,7 +2329,7 @@ struct mISDNport *mISDNport_open(int port, char *portname, int ptp, int force_nt
PDEBUG(DEBUG_BCHANNEL, "using 'mISDN_dsp.o' module\n");
start_trace(mISDNport->portnum,
- interface,
+ ifport->interface,
NULL,
NULL,
DIRECTION_NONE,