Fixed includes to latest mISDNuser structures.
authorAndreas Eversberg <jolly@eversberg.eu>
Thu, 11 Mar 2010 15:27:28 +0000 (16:27 +0100)
committerAndreas Eversberg <jolly@eversberg.eu>
Thu, 11 Mar 2010 15:27:28 +0000 (16:27 +0100)
modified:   Makefile.am
modified:   Makefile.in
modified:   README
modified:   bchannel.c
modified:   dss1.cpp
modified:   mISDN.cpp
modified:   main.h

Makefile.am
Makefile.in
README
bchannel.c
dss1.cpp
mISDN.cpp
main.h

index 2125468..b56560b 100644 (file)
@@ -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 \
index e45b8a0..6bd502b 100644 (file)
@@ -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 (file)
--- 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.
 
 
 
index b6107b6..f49572b 100644 (file)
@@ -25,9 +25,9 @@
 #include <sys/socket.h>
 #include <mISDNif.h>
 
-#define AF_COMPATIBILITY_FUNC 1
-#define MISDN_OLD_AF_COMPATIBILITY 1
-#include <compat_af_isdn.h>
+#include <mISDN/mISDNcompat.h>
+int __af_isdn = MISDN_AF_ISDN;
+#include <mISDN/q931.h>
 
 #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;
 }
 
index 3bcf410..d1430dc 100644 (file)
--- a/dss1.cpp
+++ b/dss1.cpp
@@ -15,7 +15,7 @@
 //#include <sys/socket.h>
 extern "C" {
 }
-#include <q931.h>
+#include <mISDN/q931.h>
 extern unsigned int mt_assign_pid;
 
 #include "ie.cpp"
index f5f8717..dc6be83 100644 (file)
--- a/mISDN.cpp
+++ b/mISDN.cpp
 #include "main.h"
 #include "myisdn.h"
 
-extern "C" {
-#define MISDN_OLD_AF_COMPATIBILITY 1
-#include <compat_af_isdn.h>
-}
-#include <q931.h>
+#include <mISDN/mISDNcompat.h>
+int __af_isdn = MISDN_AF_ISDN;
+#include <mISDN/q931.h>
 
 #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 (file)
--- 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 <mbuffer.h>
+#include <mISDN/mbuffer.h>
 #ifdef __cplusplus
 }
 #endif