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