summaryrefslogtreecommitdiff
blob: 1f4e50199ae52205cab7e500b44c1b232c3ee9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff -urN capisuite-0.4.5.org/acinclude.m4 capisuite-0.4.5/acinclude.m4
--- capisuite-0.4.5.org/acinclude.m4	2004-11-28 14:35:28.000000000 +0100
+++ capisuite-0.4.5/acinclude.m4	2005-03-08 07:31:42.130970593 +0100
@@ -72,6 +72,21 @@
 )
 ]) dnl CS_TEST_CAPI4LINUX
 
+#
+# old capiutils.h missed the Globalconfiguration in BProtocol
+# in library version 3 this was added to the API
+#
+AC_DEFUN([CS_TEST_CAPI4LINUX_V3],
+[AC_MSG_CHECKING([for capi20 ALERT with sending complete])
+AC_TRY_COMPILE([#include <capiutils.h>],
+  [_cmsg cm;void *p; p=CONNECT_REQ_GLOBALCONFIGURATION(&cm);],
+  [
+    AC_DEFINE([HAVE_CAPI4LINUX_V3],1,[we have GLOBALCONFIGURATION in BProtocol])
+    AC_MSG_RESULT([yes])
+  ],
+  [AC_MSG_RESULT([no])]
+)]) dnl CS_TEST_CAPI4LINUX_V3
+
 # PGAC_CHECK_PYTHON_DIRS
 # -----------------------
 # Determine the name of various directory of a given Python installation.
diff -urN capisuite-0.4.5.org/config.h.in capisuite-0.4.5/config.h.in
--- capisuite-0.4.5.org/config.h.in	2004-11-28 14:36:20.000000000 +0100
+++ capisuite-0.4.5/config.h.in	2005-03-08 07:31:42.135969715 +0100
@@ -18,6 +18,9 @@
 /* we have new ALERT_REQ implementation */
 #undef HAVE_NEW_CAPI4LINUX
 
+/* we have GLOBALCONFIGURATION in BProtocol */
+#undef HAVE_CAPI4LINUX_V3
+
 /* we can #include<ostream> instead of ostream.h - new gcc3 feature */
 #undef HAVE_OSTREAM
 
diff -urN capisuite-0.4.5.org/configure.in capisuite-0.4.5/configure.in
--- capisuite-0.4.5.org/configure.in	2004-11-28 14:35:16.000000000 +0100
+++ capisuite-0.4.5/configure.in	2005-03-08 07:31:42.141968662 +0100
@@ -18,6 +18,7 @@
 CS_TEST_GCC3
 CS_TEST_SFFTOBMP
 CS_TEST_CAPI4LINUX
+CS_TEST_CAPI4LINUX_V3
 
 CS_SET_DOCDIR
 
diff -urN capisuite-0.4.5.org/src/backend/capi.cpp capisuite-0.4.5/src/backend/capi.cpp
--- capisuite-0.4.5.org/src/backend/capi.cpp	2004-11-28 14:35:25.000000000 +0100
+++ capisuite-0.4.5/src/backend/capi.cpp	2005-03-08 07:35:02.553782154 +0100
@@ -148,7 +148,15 @@
 		<< " CIPValue 0x" << CIPValue << ", B1proto 0x" << B1protocol << ", B2proto 0x" << B2protocol <<", B3proto 0x" << B3protocol << endl;
 	}
 	unsigned info=CONNECT_REQ(&CMSG, applId, messageNumber, controller, CIPValue, calledPartyNumber, callingPartyNumber, NULL, NULL,
-		B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+		B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration,
+	#ifdef HAVE_CAPI4LINUX_V3
+		NULL,
+	#endif
+		NULL, NULL, NULL, NULL, NULL, NULL, NULL
+	#ifdef HAVE_CAPI4LINUX_V3
+		,NULL
+	#endif
+	);
 	if (debug_level >= 2) {
 		debug << prefix() << "info: " << info << endl;
 	}
@@ -181,7 +189,12 @@
 
 	if (debug_level >= 2)	    	debug << prefix() << ">SELECT_B_PROTOCOL_REQ: ApplId 0x" << hex << applId << ", MsgNr 0x" << messageNumber << ", PLCI 0x" << plci
 	 		     << ", B1protocol " << B1protocol << ", B2protocol " << B2protocol << ", B3protocol " << B3protocol << endl;
-	unsigned info=SELECT_B_PROTOCOL_REQ(&CMSG, applId, messageNumber++, plci, B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration);
+	unsigned info=SELECT_B_PROTOCOL_REQ(&CMSG, applId, messageNumber++, plci, B1protocol, B2protocol, B3protocol,
+		B1configuration, B2configuration, B3configuration
+	#ifdef HAVE_CAPI4LINUX_V3
+		,NULL
+	#endif
+	);
 	if (debug_level >= 2)
 			debug << prefix() << "info: " << info << endl;
 
@@ -295,12 +308,17 @@
 		 << reject << ", B1proto 0x" << B1protocol << ", B2proto 0x" << B2protocol << ", B3proto 0x" << B3protocol << endl;
 
 	_cmsg new_message;
-	unsigned info=CONNECT_RESP(&new_message, applId, messageNumber, plci, reject, B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+	unsigned info=CONNECT_RESP(&new_message, applId, messageNumber, plci, reject, B1protocol, B2protocol, B3protocol,
+		B1configuration, B2configuration, B3configuration,
+	#ifdef HAVE_CAPI4LINUX_V3
+		NULL,
+	#endif
+		NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 	if (debug_level >= 2)
 		debug << prefix() << "info: " << info << endl;
 
 	if (info != 0)
-   		throw(CapiMsgError(info,"Error while CONNECT_REQ: "+Capi::describeParamInfo(info),"Capi::connect_resp()"));
+   		throw(CapiMsgError(info,"Error while CONNECT_RESP: "+Capi::describeParamInfo(info),"Capi::connect_resp()"));
 
 }