Репозитории ALT
S: | 1.1.5-alt3.1 |
5.1: | 0.1-alt3.20070317 |
4.1: | 0.1-alt2.20070317 |
4.0: | 0.1-alt2.20070317 |
Группа :: Система/Серверы
Пакет: mISDN
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: misdn-1.1.5-alt3.1.patch
Скачать
Скачать
mISDN/drivers/isdn/hardware/mISDN/layer2.c | 46 +++++++++++++++---------------
mISDNuser/Makefile | 20 +++++++++----
mISDNuser/i4lnet/Makefile | 4 +--
mISDNuser/i4lnet/net_l2.c | 46 +++++++++++++++---------------
mISDNuser/lib/Makefile | 2 +-
mISDNuser/suppserv/Makefile | 2 ++
mISDNuser/voip/Makefile | 15 ++++------
7 files changed, 70 insertions(+), 65 deletions(-)
diff --git a/mISDN/drivers/isdn/hardware/mISDN/layer2.c b/mISDN/drivers/isdn/hardware/mISDN/layer2.c
index 9ad1f05..3efb860 100644
--- a/mISDN/drivers/isdn/hardware/mISDN/layer2.c
+++ b/mISDN/drivers/isdn/hardware/mISDN/layer2.c
@@ -99,14 +99,14 @@ static char *strL2Event[] =
"EV_L2_FRAME_ERROR",
};
-inline u_int
+static inline u_int
l2headersize(layer2_t *l2, int ui)
{
return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) +
(test_bit(FLG_LAPD, &l2->flag) ? 2 : 1));
}
-inline u_int
+static inline u_int
l2addrsize(layer2_t *l2)
{
return (test_bit(FLG_LAPD, &l2->flag) ? 2 : 1);
@@ -309,7 +309,7 @@ ReleaseWin(layer2_t *l2)
printk(KERN_WARNING "isdnl2 freed %d skbuffs in release\n", cnt);
}
-inline unsigned int
+static inline unsigned int
cansend(layer2_t *l2)
{
unsigned int p1;
@@ -321,7 +321,7 @@ cansend(layer2_t *l2)
return ((p1 < l2->window) && !test_bit(FLG_PEER_BUSY, &l2->flag));
}
-inline void
+static inline void
clear_exception(layer2_t *l2)
{
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
@@ -367,31 +367,31 @@ enqueue_ui(layer2_t *l2, struct sk_buff *skb)
dev_kfree_skb(skb);
}
-inline int
+static inline int
IsUI(u_char * data)
{
return ((data[0] & 0xef) == UI);
}
-inline int
+static inline int
IsUA(u_char * data)
{
return ((data[0] & 0xef) == UA);
}
-inline int
+static inline int
IsDM(u_char * data)
{
return ((data[0] & 0xef) == DM);
}
-inline int
+static inline int
IsDISC(u_char * data)
{
return ((data[0] & 0xef) == DISC);
}
-inline int
+static inline int
IsRR(u_char * data, layer2_t *l2)
{
if (test_bit(FLG_MOD128, &l2->flag))
@@ -400,7 +400,7 @@ IsRR(u_char * data, layer2_t *l2)
return ((data[0] & 0xf) == 1);
}
-inline int
+static inline int
IsSFrame(u_char * data, layer2_t *l2)
{
register u_char d = *data;
@@ -410,7 +410,7 @@ IsSFrame(u_char * data, layer2_t *l2)
return(((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c));
}
-inline int
+static inline int
IsSABME(u_char * data, layer2_t *l2)
{
u_char d = data[0] & ~0x10;
@@ -418,19 +418,19 @@ IsSABME(u_char * data, layer2_t *l2)
return (test_bit(FLG_MOD128, &l2->flag) ? d == SABME : d == SABM);
}
-inline int
+static inline int
IsREJ(u_char * data, layer2_t *l2)
{
return (test_bit(FLG_MOD128, &l2->flag) ? data[0] == REJ : (data[0] & 0xf) == REJ);
}
-inline int
+static inline int
IsFRMR(u_char * data)
{
return ((data[0] & 0xef) == FRMR);
}
-inline int
+static inline int
IsRNR(u_char * data, layer2_t *l2)
{
return (test_bit(FLG_MOD128, &l2->flag) ? data[0] == RNR : (data[0] & 0xf) == RNR);
@@ -568,13 +568,13 @@ send_uframe(layer2_t *l2, struct sk_buff *skb, u_char cmd, u_char cr)
}
-inline u_char
+static inline u_char
get_PollFlag(layer2_t *l2, struct sk_buff * skb)
{
return (skb->data[l2addrsize(l2)] & 0x10);
}
-inline u_char
+static inline u_char
get_PollFlagFree(layer2_t *l2, struct sk_buff *skb)
{
u_char PF;
@@ -584,28 +584,28 @@ get_PollFlagFree(layer2_t *l2, struct sk_buff *skb)
return (PF);
}
-inline void
+static inline void
start_t200(layer2_t *l2, int i)
{
mISDN_FsmAddTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
restart_t200(layer2_t *l2, int i)
{
mISDN_FsmRestartTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
stop_t200(layer2_t *l2, int i)
{
if(test_and_clear_bit(FLG_T200_RUN, &l2->flag))
mISDN_FsmDelTimer(&l2->t200, i);
}
-inline void
+static inline void
st5_dl_release_l2l3(layer2_t *l2)
{
int pr;
@@ -618,7 +618,7 @@ st5_dl_release_l2l3(layer2_t *l2)
l2up_create(l2, pr, 0, 0, NULL);
}
-inline void
+static inline void
lapb_dl_release_l2l3(layer2_t *l2, int f)
{
if (test_bit(FLG_LAPB, &l2->flag))
@@ -1069,7 +1069,7 @@ enquiry_cr(layer2_t *l2, u_char typ, u_char cr, u_char pf)
enqueue_super(l2, skb);
}
-inline void
+static inline void
enquiry_response(layer2_t *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
@@ -1079,7 +1079,7 @@ enquiry_response(layer2_t *l2)
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
}
-inline void
+static inline void
transmit_enquiry(layer2_t *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
diff --git a/mISDNuser/Makefile b/mISDNuser/Makefile
index 01cfe16..5dd6f88 100644
--- a/mISDNuser/Makefile
+++ b/mISDNuser/Makefile
@@ -6,7 +6,8 @@ SUBMINOR=5
#
# Set this to your local copy of mISDN
#
-MISDNDIR := /usr/src/mqueue/mISDN
+# MISDNDIR is defaulted to where mISDN installs its header files
+MISDNDIR := ../mISDN
PWD=$(shell pwd)
#
@@ -38,10 +39,10 @@ endif
export CFLAGS
-mISDNLIB := $(PWD)/lib/libmISDN.a
-mISDNNETLIB := $(PWD)/i4lnet/libmisdnnet.a
-export mISDNLIB
-export mISDNNETLIB
+#mISDNLIB := $(PWD)/lib/libmISDN.so
+#mISDNNETLIB := $(PWD)/i4lnet/libmisdnnet.so
+#export mISDNLIB
+#export mISDNNETLIB
SUBDIRS := lib example
@@ -51,7 +52,12 @@ SUBDIRS += $(shell if test -d voip ; then echo voip; fi)
SUBDIRS += $(shell if test -d suppserv ; then echo suppserv; fi)
SUBDIRS += $(shell if test -d debugtool ; then echo debugtool; fi)
-LIBS := lib/libmISDN.a
+LIBS := -lmISDN.so
+LDFLAGS += -L../lib -L../i4lnet
+LDLIBS += -lmISDN -lisdnnet
+
+export LDFLAGS
+export LDLIBS
all: test_misdn_includes
$(MAKE) TARGET=$@ subdirs
@@ -69,6 +75,8 @@ install: install_path all
subdirs:
+ $(MAKE) -C lib $(TARGET)
+ $(MAKE) -C i4lnet $(TARGET)
set -e; for i in $(SUBDIRS) ; do $(MAKE) -C $$i $(TARGET); done
clean:
diff --git a/mISDNuser/i4lnet/Makefile b/mISDNuser/i4lnet/Makefile
index 352d0ab..e22437d 100644
--- a/mISDNuser/i4lnet/Makefile
+++ b/mISDNuser/i4lnet/Makefile
@@ -28,10 +28,10 @@ libisdnnet.a: $(ISDNNET_OBJ)
$(RANLIB) $@
libisdnnet.so: $(ISDNNET_OBJ)
- $(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $^
+ $(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $^ -L../lib -lmISDN -lpthread
.c.o:
- $(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) -fPIC -o $@ -c $<
.c.lo:
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
diff --git a/mISDNuser/i4lnet/net_l2.c b/mISDNuser/i4lnet/net_l2.c
index a35e395..2437cc0 100644
--- a/mISDNuser/i4lnet/net_l2.c
+++ b/mISDNuser/i4lnet/net_l2.c
@@ -189,7 +189,7 @@ ReleaseWin(layer2_t *l2)
dprint(DBGM_L2, l2->nst->cardnr, "isdnl2 freed %d msguffs in release\n", cnt);
}
-inline unsigned int
+static inline unsigned int
cansend(layer2_t *l2)
{
unsigned int p1;
@@ -201,7 +201,7 @@ cansend(layer2_t *l2)
return ((p1 < l2->window) && !test_bit(FLG_PEER_BUSY, &l2->flag));
}
-inline void
+static inline void
clear_exception(layer2_t *l2)
{
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
@@ -210,14 +210,14 @@ clear_exception(layer2_t *l2)
clear_peer_busy(l2);
}
-inline int
+static inline int
l2headersize(layer2_t *l2, int ui)
{
return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) +
(test_bit(FLG_LAPD, &l2->flag) ? 2 : 1));
}
-inline int
+static inline int
l2addrsize(layer2_t *l2)
{
return (test_bit(FLG_LAPD, &l2->flag) ? 2 : 1);
@@ -255,31 +255,31 @@ enqueue_super(layer2_t *l2, msg_t *msg)
#define enqueue_ui(a, b) enqueue_super(a, b)
-inline int
+static inline int
IsUI(u_char * data, layer2_t *l2)
{
return ((data[0] & 0xef) == UI);
}
-inline int
+static inline int
IsUA(u_char * data, layer2_t *l2)
{
return ((data[0] & 0xef) == UA);
}
-inline int
+static inline int
IsDM(u_char * data, layer2_t *l2)
{
return ((data[0] & 0xef) == DM);
}
-inline int
+static inline int
IsDISC(u_char * data, layer2_t *l2)
{
return ((data[0] & 0xef) == DISC);
}
-inline int
+static inline int
IsRR(u_char * data, layer2_t *l2)
{
if (test_bit(FLG_MOD128, &l2->flag))
@@ -288,7 +288,7 @@ IsRR(u_char * data, layer2_t *l2)
return ((data[0] & 0xf) == 1);
}
-inline int
+static inline int
IsSFrame(u_char * data, layer2_t *l2)
{
register u_char d = *data;
@@ -298,26 +298,26 @@ IsSFrame(u_char * data, layer2_t *l2)
return(((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c));
}
-inline int
+static inline int
IsSABME(u_char * data, layer2_t *l2)
{
u_char d = data[0] & ~0x10;
return (test_bit(FLG_MOD128, &l2->flag) ? d == SABME : d == SABM);
}
-inline int
+static inline int
IsREJ(u_char * data, layer2_t *l2)
{
return (test_bit(FLG_MOD128, &l2->flag) ? data[0] == REJ : (data[0] & 0xf) == REJ);
}
-inline int
+static inline int
IsFRMR(u_char * data, layer2_t *l2)
{
return ((data[0] & 0xef) == FRMR);
}
-inline int
+static inline int
IsRNR(u_char * data, layer2_t *l2)
{
return (test_bit(FLG_MOD128, &l2->flag) ? data[0] == RNR : (data[0] & 0xf) == RNR);
@@ -450,13 +450,13 @@ send_uframe(layer2_t *l2, msg_t *msg, u_char cmd, u_char cr)
}
-inline u_char
+static inline u_char
get_PollFlag(layer2_t *l2, msg_t * msg)
{
return (msg->data[l2addrsize(l2)] & 0x10);
}
-inline u_char
+static inline u_char
get_PollFlagFree(layer2_t *l2, msg_t *msg)
{
u_char PF;
@@ -466,28 +466,28 @@ get_PollFlagFree(layer2_t *l2, msg_t *msg)
return (PF);
}
-inline void
+static inline void
start_t200(layer2_t *l2, int i)
{
FsmAddTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
restart_t200(layer2_t *l2, int i)
{
FsmRestartTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
stop_t200(layer2_t *l2, int i)
{
if(test_and_clear_bit(FLG_T200_RUN, &l2->flag))
FsmDelTimer(&l2->t200, i);
}
-inline void
+static inline void
st5_dl_release_l2l3(layer2_t *l2)
{
int pr;
@@ -500,7 +500,7 @@ st5_dl_release_l2l3(layer2_t *l2)
l2up_create(l2, pr, CES(l2), 0, NULL);
}
-inline void
+static inline void
lapb_dl_release_l2l3(layer2_t *l2, int f)
{
if (test_bit(FLG_LAPB, &l2->flag))
@@ -934,7 +934,7 @@ enquiry_cr(layer2_t *l2, u_char typ, u_char cr, u_char pf)
enqueue_super(l2, msg);
}
-inline void
+static inline void
enquiry_response(layer2_t *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
@@ -944,7 +944,7 @@ enquiry_response(layer2_t *l2)
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
}
-inline void
+static inline void
transmit_enquiry(layer2_t *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
diff --git a/mISDNuser/lib/Makefile b/mISDNuser/lib/Makefile
index 5debb83..6104e44 100644
--- a/mISDNuser/lib/Makefile
+++ b/mISDNuser/lib/Makefile
@@ -28,7 +28,7 @@ libmISDN.so: $(LIBMISDN_OBJS)
$(CC) $(CFLAGS) -shared -Xlinker -x -o $@ $^
.c.o:
- $(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) -fPIC -o $@ -c $<
.c.lo:
$(CC) $(CFLAGS) -fPIC -o $@ -c $<
diff --git a/mISDNuser/suppserv/Makefile b/mISDNuser/suppserv/Makefile
index 55b1954..e3be55e 100644
--- a/mISDNuser/suppserv/Makefile
+++ b/mISDNuser/suppserv/Makefile
@@ -2,6 +2,8 @@ CC = gcc
AR = ar
RANLIB = ranlib
+CFLAGS+=-fPIC
+
#CFLAGS += -DASN1_DEBUG
SUPPSERV_OBJ = asn1.o asn1_enc.o asn1_generic.o asn1_aoc.o asn1_basic_service.o asn1_comp.o asn1_diversion.o asn1_address.o fac.o
diff --git a/mISDNuser/voip/Makefile b/mISDNuser/voip/Makefile
index 90717cf..8b83681 100644
--- a/mISDNuser/voip/Makefile
+++ b/mISDNuser/voip/Makefile
@@ -2,8 +2,8 @@
# SF_DIR = /home/kkeil/speak_freely-7.2
# endif
-mISDNLIB = $(mISDN_DIR)/lib/libmISDN.a
-ISDNNETLIB = $(mISDN_DIR)/i4lnet/libisdnnet.a
+mISDNLIB = $(mISDN_DIR)/lib/libmISDN.so
+ISDNNETLIB = $(mISDN_DIR)/i4lnet/libisdnnet.so
HLIBINCL = $(mISDN_DIR)/include/mISDNlib.h
INETINCL = $(mISDN_DIR)/include/isdn_net.h
@@ -12,13 +12,8 @@ EXTRA_CFLAGS :=
EXTRA_INCLUDE :=
EXTRA_LIB :=
-#GSM_DIR := ../../gsm-1.0-pl6
-
-ifdef GSM_DIR
EXTRA_CFLAGS += -DGSM_COMPRESSION
-EXTRA_INCLUDE += -I$(GSM_DIR)/inc
-EXTRA_LIB += $(GSM_DIR)/lib/libgsm.a
-endif
+EXTRA_LIB += /usr/lib/libgsm.so
PROGRAMMS = voipisdn
@@ -50,8 +45,8 @@ VOIPISDNOBJ = voip_isdn.o rtpacket.o voip_timer.o \
voipisdn: $(VOIPISDNOBJ) $(ISDNNETLIB) $(mISDNLIB) $(EXTRA_LIB) \
$(HLIBINCL) $(INETINCL) \
globals.h iapplication.h
- $(CC) $(VOIPISDNOBJ) $(ISDNNETLIB) $(mISDNLIB) $(EXTRA_LIB) \
- $(LFLAGS) -o $@
+ $(CC) -fPIC $(VOIPISDNOBJ) $(EXTRA_LIB) \
+ -o $@ $(LFLAGS) $(LDLIBS) $(LDFLAGS)
rtpacket.o: rtpacket.c rtpacket.h \
$(mISDN_DIR)/include/g711.h