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
This commit is contained in:
gernot 2004-07-15 00:19:15 +00:00
parent af7bf4992e
commit c345ad9d9d
4 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-07-15 Gernot Hillier <gernot@hillier.de>
* 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 <gernot@hillier.de>
* src/backend/connection.cpp (info_ind_called_party_nr): prevent
CapiSuite from crashing when a too high DDIBaseLength was configured,

View File

@ -39,6 +39,18 @@ AC_TRY_COMPILE([#include <string>],
)
]) dnl CS_TEST_GCC
AC_DEFUN([CS_TEST_CAPI4LINUX],
[AC_MSG_CHECKING([for new ALERT_REQ signature in capiutils.h])
AC_TRY_COMPILE([#include <capiutils.h>],
[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.

View File

@ -16,6 +16,7 @@ AC_CHECK_HEADERS([sys/time.h])
AC_HEADER_TIME
CS_TEST_GCC3
CS_TEST_CAPI4LINUX
CS_SET_DOCDIR

View File

@ -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;
}