From c345ad9d9d5059c741846941c44354e1a1ab90e8 Mon Sep 17 00:00:00 2001 From: gernot Date: Thu, 15 Jul 2004 00:19:15 +0000 Subject: [PATCH] support new parameter in ALERT_REQ of newer capi4linux versions, thx to Steffen Barszus for reporting and the fix git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@315 4ebea2bb-67d4-0310-8558-a5799e421b66 --- ChangeLog | 6 ++++++ acinclude.m4 | 12 ++++++++++++ configure.in | 1 + src/backend/capi.cpp | 8 +++++++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bde1d71..e9a4973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-07-15 Gernot Hillier + * configure.in: support new parameter in ALERT_REQ of newer capi4linux + versions, thx to Steffen Barszus for reporting and the fix + * src/backend/capi.cpp (Capi::alert_req): Likewise. + * acinclude.m4 (CS_TEST_CAPI4LINUX): Likewise. + 2004-06-10 Gernot Hillier * src/backend/connection.cpp (info_ind_called_party_nr): prevent CapiSuite from crashing when a too high DDIBaseLength was configured, diff --git a/acinclude.m4 b/acinclude.m4 index 87adf10..2618efd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -39,6 +39,18 @@ AC_TRY_COMPILE([#include ], ) ]) dnl CS_TEST_GCC +AC_DEFUN([CS_TEST_CAPI4LINUX], +[AC_MSG_CHECKING([for new ALERT_REQ signature in capiutils.h]) +AC_TRY_COMPILE([#include ], + [ALERT_REQ (NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);], + [ + AC_DEFINE([HAVE_NEW_CAPI4LINUX],1,[we have new ALERT_REQ implementation]) + AC_MSG_RESULT([yes]) + ], + AC_MSG_RESULT([no]) +) +]) dnl CS_TEST_CAPI4LINUX + # PGAC_CHECK_PYTHON_DIRS # ----------------------- # Determine the name of various directory of a given Python installation. diff --git a/configure.in b/configure.in index 1644d83..c5cd123 100644 --- a/configure.in +++ b/configure.in @@ -16,6 +16,7 @@ AC_CHECK_HEADERS([sys/time.h]) AC_HEADER_TIME CS_TEST_GCC3 +CS_TEST_CAPI4LINUX CS_SET_DOCDIR diff --git a/src/backend/capi.cpp b/src/backend/capi.cpp index b2a29a9..1e1b1ce 100644 --- a/src/backend/capi.cpp +++ b/src/backend/capi.cpp @@ -19,6 +19,7 @@ #include "connection.h" #include "applicationinterface.h" #include "capi.h" +#include "../../config.h" void* capi_exec_handler(void* arg) { @@ -117,7 +118,12 @@ Capi::alert_req(_cdword plci) throw (CapiMsgError) if (debug_level >= 2) { debug << prefix() << ">ALERT_REQ: ApplId 0x" << hex << applId << ", MsgNr 0x" << messageNumber << ", PLCI 0x" << plci << endl; } - unsigned info=ALERT_REQ(&CMSG, applId, messageNumber++, plci, NULL, NULL, NULL, NULL); + unsigned info=ALERT_REQ(&CMSG, applId, messageNumber++, plci, + NULL, NULL, NULL, NULL + #ifdef HAVE_NEW_CAPI4LINUX + , NULL + #endif + ); if (debug_level >= 2) { debug << prefix() << "info: " << info << endl; }