From c4fcb0668c607cb0135444274ff62572cf6111c4 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Thu, 11 Mar 2010 16:27:28 +0100 Subject: [PATCH] Fixed includes to latest mISDNuser structures. modified: Makefile.am modified: Makefile.in modified: README modified: bchannel.c modified: dss1.cpp modified: mISDN.cpp modified: main.h --- Makefile.am | 2 +- Makefile.in | 2 +- README | 2 +- bchannel.c | 8 +++----- dss1.cpp | 2 +- mISDN.cpp | 12 ++++-------- main.h | 2 +- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2125468..b56560b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -95,7 +95,7 @@ install-exec-hook: $(INSTALL) chan_lcr.so $(astmoddir) endif -INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) -Wall -I/usr/include/mISDNuser $(INSTALLATION_DEFINES) +INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) -Wall $(INSTALLATION_DEFINES) lcr_SOURCES = $(GSM_SOURCE) $(SS5_SOURCE) select.c action.cpp mISDN.cpp tones.c \ action_efi.cpp crypt.cpp mail.c trace.c \ diff --git a/Makefile.in b/Makefile.in index e45b8a0..6bd502b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -260,7 +260,7 @@ INSTALLATION_DEFINES = \ @ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_SOURCES = @ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_LDFLAGS = -shared @ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po select.po -INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) -Wall -I/usr/include/mISDNuser $(INSTALLATION_DEFINES) +INCLUDES = $(all_includes) $(GSM_INCLUDE) $(SS5_INCLUDE) -Wall $(INSTALLATION_DEFINES) lcr_SOURCES = $(GSM_SOURCE) $(SS5_SOURCE) select.c action.cpp mISDN.cpp tones.c \ action_efi.cpp crypt.cpp mail.c trace.c \ action_vbox.cpp dss1.cpp main.c \ diff --git a/README b/README index e6bd449..12dd1f3 100644 --- a/README +++ b/README @@ -540,7 +540,7 @@ Changes after Version 1.7 - Fixed HLC (higher layer capability) modification to LCR routing. - Fixed chan_lcr fax queue buffer. Added LCR_TRANSFERCAPABILITY environment. - Fixed compiler warnings when compiling with gcc 4.3.4. - +- Fixed includes to latest mISDNuser structures. diff --git a/bchannel.c b/bchannel.c index b6107b6..f49572b 100644 --- a/bchannel.c +++ b/bchannel.c @@ -25,9 +25,9 @@ #include #include -#define AF_COMPATIBILITY_FUNC 1 -#define MISDN_OLD_AF_COMPATIBILITY 1 -#include +#include +int __af_isdn = MISDN_AF_ISDN; +#include #define HAVE_ATTRIBUTE_always_inline 1 #define HAVE_ARPA_INET_H 1 @@ -74,8 +74,6 @@ static void bchannel_send_queue(struct bchannel *bchannel); int bchannel_initialize(void) { - init_af_isdn(); - return 0; } diff --git a/dss1.cpp b/dss1.cpp index 3bcf410..d1430dc 100644 --- a/dss1.cpp +++ b/dss1.cpp @@ -15,7 +15,7 @@ //#include extern "C" { } -#include +#include extern unsigned int mt_assign_pid; #include "ie.cpp" diff --git a/mISDN.cpp b/mISDN.cpp index f5f8717..dc6be83 100644 --- a/mISDN.cpp +++ b/mISDN.cpp @@ -12,11 +12,9 @@ #include "main.h" #include "myisdn.h" -extern "C" { -#define MISDN_OLD_AF_COMPATIBILITY 1 -#include -} -#include +#include +int __af_isdn = MISDN_AF_ISDN; +#include #undef offsetof #ifdef __compiler_offsetof @@ -56,12 +54,10 @@ int mISDN_initialize(void) { char filename[256]; - init_af_isdn(); - /* try to open raw socket to check kernel */ mISDNsocket = socket(PF_ISDN, SOCK_RAW, ISDN_P_BASE); if (mISDNsocket < 0) { - fprintf(stderr, "Cannot open mISDN due to '%s'. (Does your Kernel support socket based mISDN?)\n", strerror(errno)); + fprintf(stderr, "Cannot open mISDN due to '%s'. (Does your Kernel support socket based mISDN? Protocol family is %d.)\n", strerror(errno), PF_ISDN); return(-1); } diff --git a/main.h b/main.h index 9b750e1..7f34911 100644 --- a/main.h +++ b/main.h @@ -131,7 +131,7 @@ void debug(const char *function, int line, const char *prefix, char *buffer); #ifdef __cplusplus extern "C" { #endif -#include +#include #ifdef __cplusplus } #endif -- 2.13.6