Compare commits
5 Commits
12cea4d231
...
bf2a9a0daf
Author | SHA1 | Date |
---|---|---|
Chrisian Richter | bf2a9a0daf | |
Chrisian Richter | ae6f65b700 | |
Chrisian Richter | 1b4a239a8f | |
Chrisian Richter | ff95eed20c | |
Chrisian Richter | 2cb951908a |
3
Makefile
3
Makefile
|
@ -21,6 +21,9 @@ export INCLUDEDIR
|
|||
|
||||
CFLAGS:= -g -Wall -O2 -I $(INCLUDEDIR) -I $(MISDNINCLUDEDIR)
|
||||
CFLAGS+= -D CLOSE_REPORT=1
|
||||
ifeq ($(shell uname -m),x86_64)
|
||||
CFLAGS += -fPIC
|
||||
endif
|
||||
export CFLAGS
|
||||
|
||||
mISDNLIB := $(PWD)/lib/libmISDN.a
|
||||
|
|
|
@ -115,9 +115,9 @@ int play_msg(devinfo_t *di) {
|
|||
}
|
||||
|
||||
int send_data(devinfo_t *di) {
|
||||
unsigned char buf[MAX_DATA_BUF+mISDN_HEADER_LEN];
|
||||
char buf[MAX_DATA_BUF+mISDN_HEADER_LEN];
|
||||
iframe_t *frm = (iframe_t *)buf;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int len, ret;
|
||||
|
||||
if (di->play<0 || !di->fplay)
|
||||
|
@ -151,7 +151,7 @@ int send_data(devinfo_t *di) {
|
|||
|
||||
int setup_bchannel(devinfo_t *di) {
|
||||
mISDN_pid_t pid;
|
||||
int ret, i;
|
||||
int ret;
|
||||
layer_info_t li;
|
||||
|
||||
|
||||
|
@ -212,7 +212,8 @@ int setup_bchannel(devinfo_t *di) {
|
|||
}
|
||||
|
||||
int send_SETUP(devinfo_t *di, int SI, char *PNr) {
|
||||
unsigned char *np, *p, *msg, buf[1024];
|
||||
char *msg, buf[1024];
|
||||
char *np,*p;
|
||||
int len, ret;
|
||||
|
||||
p = msg = buf + mISDN_HEADER_LEN;
|
||||
|
|
|
@ -257,9 +257,9 @@ int play_msg(devinfo_t *di) {
|
|||
}
|
||||
|
||||
int send_data(devinfo_t *di) {
|
||||
unsigned char buf[MAX_DATA_BUF+mISDN_HEADER_LEN];
|
||||
char buf[MAX_DATA_BUF+mISDN_HEADER_LEN];
|
||||
iframe_t *frm = (iframe_t *)buf;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int len, ret;
|
||||
|
||||
if (di->play<0 || !di->fplay)
|
||||
|
@ -378,9 +378,9 @@ int send_SETUP(devinfo_t *di, int SI, char *PNr) {
|
|||
}
|
||||
p += len;
|
||||
if (SI == 1) { /* Audio */
|
||||
len = mISDN_AddIE(qi, p, IE_BEARER, "\x3\x90\x90\xa3");
|
||||
len = mISDN_AddIE(qi, p, IE_BEARER, (unsigned char*)"\x3\x90\x90\xa3");
|
||||
} else { /* default Datatransmission 64k */
|
||||
len = mISDN_AddIE(qi, p, IE_BEARER, "\x2\x88\x90");
|
||||
len = mISDN_AddIE(qi, p, IE_BEARER, (unsigned char*)"\x2\x88\x90");
|
||||
}
|
||||
if (len<0) {
|
||||
fprintf(stdout,"Add IE_BEARER error %d\n", len);
|
||||
|
|
|
@ -63,9 +63,8 @@ alloc_msg(int size)
|
|||
m->tail = m->data;
|
||||
m->end = m->head + m->size;
|
||||
m->len = 0;
|
||||
dprint(DBGM_MSG,"%s: %d msg(%p) at %p %p\n", __FUNCTION__,
|
||||
alloc_msg_cnt, m, __builtin_return_address(0),
|
||||
__builtin_return_address(1));
|
||||
dprint(DBGM_MSG,"%s: %d msg(%p)\n", __FUNCTION__,
|
||||
alloc_msg_cnt, m);
|
||||
return(m);
|
||||
}
|
||||
|
||||
|
@ -76,9 +75,9 @@ free_msg(msg_t *msg) {
|
|||
wprint("free NULL msg\n");
|
||||
return;
|
||||
}
|
||||
dprint(DBGM_MSG,"%s: %d/%d msg(%p) at %p %p\n", __FUNCTION__,
|
||||
alloc_msg_cnt, free_queue->len, msg,
|
||||
__builtin_return_address(0), __builtin_return_address(1));
|
||||
dprint(DBGM_MSG,"%s: %d/%d msg(%p) \n", __FUNCTION__,
|
||||
alloc_msg_cnt, free_queue->len, msg);
|
||||
|
||||
if (msg->list) {
|
||||
if (msg->list == free_queue)
|
||||
wprint("%s: free twice msg(%p)\n", __FUNCTION__,
|
||||
|
|
|
@ -893,8 +893,10 @@ l3dss1_release(layer3_proc_t *pc, int pr, void *arg)
|
|||
l3dss1_message(pc, MT_RELEASE_COMPLETE);
|
||||
if (mISDN_l3up(pc, umsg))
|
||||
free_msg(umsg);
|
||||
newl3state(pc, 0);
|
||||
|
||||
/* newl3state(pc, 0);
|
||||
send_proc(pc, IMSG_END_PROC_M, NULL);
|
||||
*/
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2375,7 +2377,7 @@ send_proc(layer3_proc_t *proc, int op, void *arg)
|
|||
proc->next->prev = proc->prev;
|
||||
if (proc->prev)
|
||||
proc->prev->next = proc->next;
|
||||
if (proc == proc->l3->proc)
|
||||
if (proc->l3 && (proc == proc->l3->proc) )
|
||||
proc->l3->proc = proc->next;
|
||||
if (proc->master) {
|
||||
if (proc->master->child == proc)
|
||||
|
|
|
@ -25,6 +25,7 @@ typedef struct _iframe {
|
|||
u_char b[4];
|
||||
void *p;
|
||||
int i;
|
||||
u_int ui;
|
||||
} data;
|
||||
} iframe_t;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ mISDN_new_layer(int fid, layer_info_t *l_info)
|
|||
ret = -EINVAL;
|
||||
} else {
|
||||
ret = 0;
|
||||
ip = &ifr->data.p;
|
||||
ip = &ifr->data.ui;
|
||||
l_info->id = *ip++;
|
||||
l_info->clone = *ip;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue