remove several warnings.
This commit is contained in:
parent
7e19929256
commit
06690d8cad
|
@ -1,11 +1,14 @@
|
|||
/*
|
||||
* $Id: avmcapictrl.c,v 1.16 2001/03/01 14:59:11 paul Exp $
|
||||
* $Id: avmcapictrl.c,v 1.17 2004/01/16 15:27:13 calle Exp $
|
||||
*
|
||||
* AVM-B1-ISDN driver for Linux. (Control-Utility)
|
||||
*
|
||||
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* $Log: avmcapictrl.c,v $
|
||||
* Revision 1.17 2004/01/16 15:27:13 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.16 2001/03/01 14:59:11 paul
|
||||
* Various patches to fix errors when using the newest glibc,
|
||||
* replaced use of insecure tempnam() function
|
||||
|
@ -80,7 +83,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/isdn.h>
|
||||
#define _LINUX_LIST_H
|
||||
#include <linux/b1lli.h>
|
||||
#include <linux/capi.h>
|
||||
/* new ioctls */
|
||||
|
@ -364,8 +367,11 @@ int main(int argc, char **argv)
|
|||
char *dn2 = 0;
|
||||
char *spid2 = 0;
|
||||
|
||||
cmd = strrchr(argv[0], '/');
|
||||
cmd = (cmd == NULL) ? argv[0] : ++cmd;
|
||||
if ((cmd = strrchr(argv[0], '/')) == 0) {
|
||||
cmd = argv[0];
|
||||
} else {
|
||||
++cmd;
|
||||
}
|
||||
if (argc > 1) {
|
||||
arg_ofs = 1;
|
||||
} else
|
||||
|
|
|
@ -59,20 +59,31 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
HAVE_LIB = @HAVE_LIB@
|
||||
INSTALL = @INSTALL@
|
||||
LIB = @LIB@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
LTLIB = @LTLIB@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
@ -102,7 +113,6 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@
|
||||
libcapi20dyn_a_LIBADD =
|
||||
libcapi20dyn_a_OBJECTS = capidyn.$(OBJEXT)
|
||||
AR = ar
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
libcapi20_la_LIBADD =
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,10 @@
|
|||
/*
|
||||
* $Id: capi20.c,v 1.19 2001/03/01 14:59:11 paul Exp $
|
||||
* $Id: capi20.c,v 1.20 2004/01/16 15:27:11 calle Exp $
|
||||
*
|
||||
* $Log: capi20.c,v $
|
||||
* Revision 1.20 2004/01/16 15:27:11 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.19 2001/03/01 14:59:11 paul
|
||||
* Various patches to fix errors when using the newest glibc,
|
||||
* replaced use of insecure tempnam() function
|
||||
|
@ -78,6 +81,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#define _LINUX_LIST_H
|
||||
#include <linux/capi.h>
|
||||
#include "capi20.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
/*
|
||||
* $Id: capidyn.c,v 1.3 2004/01/16 14:57:22 calle Exp $
|
||||
* $Id: capidyn.c,v 1.4 2004/01/16 15:27:11 calle Exp $
|
||||
*
|
||||
* $Log: capidyn.c,v $
|
||||
* Revision 1.4 2004/01/16 15:27:11 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.3 2004/01/16 14:57:22 calle
|
||||
* gcc warning removed.
|
||||
*
|
||||
|
@ -16,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#define _LINUX_LIST_H
|
||||
#include <linux/capi.h>
|
||||
#include <string.h>
|
||||
#include "capi20.h"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
|
@ -130,7 +130,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
|||
$(ACLOCAL_M4): configure.in
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: capiinfo.c,v 1.10 2003/08/16 16:56:02 keil Exp $
|
||||
/* $Id: capiinfo.c,v 1.11 2004/01/16 15:27:12 calle Exp $
|
||||
*
|
||||
* A CAPI application to get infomation about installed controllers
|
||||
*
|
||||
|
@ -17,6 +17,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: capiinfo.c,v $
|
||||
* Revision 1.11 2004/01/16 15:27:12 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.10 2003/08/16 16:56:02 keil
|
||||
* fix some typos
|
||||
*
|
||||
|
@ -54,6 +57,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#define _LINUX_LIST_H
|
||||
#include <capi20.h>
|
||||
#include <linux/capi.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,10 @@
|
|||
/*
|
||||
* $Id: capiinit.c,v 1.14 2004/01/16 12:33:16 calle Exp $
|
||||
* $Id: capiinit.c,v 1.15 2004/01/16 15:27:12 calle Exp $
|
||||
*
|
||||
* $Log: capiinit.c,v $
|
||||
* Revision 1.15 2004/01/16 15:27:12 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.14 2004/01/16 12:33:16 calle
|
||||
* Modifications to let ist run with patched 2.6 kernel.
|
||||
* Pure 2.6.0/2.6.1 is not working.
|
||||
|
@ -57,6 +60,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -70,7 +75,7 @@
|
|||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#define _LINUX_LIST_H
|
||||
#include <linux/b1lli.h>
|
||||
#include <linux/capi.h>
|
||||
#include <linux/kernelcapi.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: capiconn.c,v 1.7 2002/05/03 11:57:49 calle Exp $
|
||||
* $Id: capiconn.c,v 1.8 2004/01/16 15:27:13 calle Exp $
|
||||
*
|
||||
* Copyright 2000 Carsten Paeth (calle@calle.in-berlin.de)
|
||||
* Copyright 2000 AVM GmbH Berlin (info@avm.de)
|
||||
|
@ -10,6 +10,9 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* $Log: capiconn.c,v $
|
||||
* Revision 1.8 2004/01/16 15:27:13 calle
|
||||
* remove several warnings.
|
||||
*
|
||||
* Revision 1.7 2002/05/03 11:57:49 calle
|
||||
* Bugfix of Bugfix.
|
||||
*
|
||||
|
@ -35,11 +38,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h> /* snprintf */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "capiconn.h"
|
||||
|
||||
static char *revision = "$Revision: 1.7 $";
|
||||
static char *revision = "$Revision: 1.8 $";
|
||||
|
||||
/* xxxxxxxxxxxxxxxxxx */
|
||||
static _cmsg cmdcmsg;
|
||||
|
@ -1119,6 +1123,28 @@ static int handle_callednumber_info(capi_connection *plcip, _cmsg *cmsg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int handle_cause_info(capi_connection *plcip, _cmsg *cmsg)
|
||||
{
|
||||
capiconn_context *ctx = plcip->ctx;
|
||||
capiconn_callbacks *cb = ctx->cb;
|
||||
|
||||
unsigned char *p = cmsg->InfoElement;
|
||||
if (cmsg->InfoNumber == 0x0008) {
|
||||
char buf[128];
|
||||
char *s, *end;
|
||||
int i;
|
||||
s = buf; end = s + sizeof(buf)-1;
|
||||
*end = 0;
|
||||
for (i=0; i < p[0]; i++) {
|
||||
snprintf(s, end-s, " %02x", p[i+1]);
|
||||
s += strlen(s);
|
||||
}
|
||||
(*cb->debugmsg)("cause bytes for plci 0x%x:%s", cmsg->adr.adrPLCI, buf);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void handle_plci(capiconn_context *ctx, _cmsg * cmsg)
|
||||
{
|
||||
capi_contr *card = findcontrbynumber(ctx, cmsg->adr.adrController&0x7f);
|
||||
|
@ -1239,6 +1265,9 @@ static void handle_plci(capiconn_context *ctx, _cmsg * cmsg)
|
|||
} else if (handle_callednumber_info(plcip, cmsg)) {
|
||||
capi_cmsg_answer(cmsg);
|
||||
send_message(card, cmsg);
|
||||
} else if (handle_cause_info(plcip, cmsg)) {
|
||||
capi_cmsg_answer(cmsg);
|
||||
send_message(card, cmsg);
|
||||
} else {
|
||||
capi_cmsg_answer(cmsg);
|
||||
send_message(card, cmsg);
|
||||
|
@ -1787,6 +1816,7 @@ static void send_listen(capi_contr *card)
|
|||
capiconn_context *ctx = card->ctx;
|
||||
|
||||
card->infomask = 0;
|
||||
card->infomask |= (1<<0); /* cause information */
|
||||
card->infomask |= (1<<2); /* Display */
|
||||
card->infomask |= (1<<6); /* Charge Info */
|
||||
if (card->ddilen) card->infomask |= (1<<7); /* Called Party Number */
|
||||
|
|
|
@ -23,10 +23,11 @@
|
|||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/in.h>
|
||||
|
||||
static char *revision = "$Revision: 1.32 $";
|
||||
|
||||
static char *revision = "$Revision: 1.33 $";
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
@ -904,6 +905,7 @@ static void setup_timeout(void)
|
|||
_timeout (timeoutfunc, 0, 1);
|
||||
}
|
||||
|
||||
#if PPPVER >= PPPVersion(2,4,0,0)
|
||||
static void unsetup_timeout(void)
|
||||
{
|
||||
timeoutshouldrun = 0;
|
||||
|
@ -911,6 +913,7 @@ static void unsetup_timeout(void)
|
|||
untimeout (timeoutfunc, 0);
|
||||
timeoutrunning = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* -------- demand & wakeup pppd -------------------------------------- */
|
||||
|
@ -1475,9 +1478,9 @@ capiconn_callbacks callbacks = {
|
|||
|
||||
capi_put_message: put_message,
|
||||
|
||||
debugmsg: dbglog,
|
||||
infomsg: info,
|
||||
errmsg: error
|
||||
debugmsg: (void (*)(const char *, ...))dbglog,
|
||||
infomsg: (void (*)(const char *, ...))info,
|
||||
errmsg: (void (*)(const char *, ...))error
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue