automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@49944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Automerge Script 19 years ago
parent 325d362076
commit 272ff651de

@ -260,7 +260,7 @@ void dec_ie_bearer(unsigned char *p, Q931_info_t *qi, int *coding, int *capabili
/* IE_CALL_ID */ /* IE_CALL_ID */
void enc_ie_call_id(unsigned char **ntmode, msg_t *msg, unsigned char *callid, int callid_len, int nt, struct misdn_bchannel *bc) void enc_ie_call_id(unsigned char **ntmode, msg_t *msg, char *callid, int callid_len, int nt, struct misdn_bchannel *bc)
{ {
unsigned char *p; unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@ -299,7 +299,7 @@ void enc_ie_call_id(unsigned char **ntmode, msg_t *msg, unsigned char *callid, i
memcpy(p+2, callid, callid_len); memcpy(p+2, callid, callid_len);
} }
void dec_ie_call_id(unsigned char *p, Q931_info_t *qi, unsigned char *callid, int *callid_len, int nt, struct misdn_bchannel *bc) void dec_ie_call_id(unsigned char *p, Q931_info_t *qi, char *callid, int *callid_len, int nt, struct misdn_bchannel *bc)
{ {
char debug[25]; char debug[25];
int i; int i;
@ -335,7 +335,7 @@ void dec_ie_call_id(unsigned char *p, Q931_info_t *qi, unsigned char *callid, in
/* IE_CALLED_PN */ /* IE_CALLED_PN */
void enc_ie_called_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, unsigned char *number, int nt, struct misdn_bchannel *bc) void enc_ie_called_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, char *number, int nt, struct misdn_bchannel *bc)
{ {
unsigned char *p; unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@ -371,7 +371,7 @@ void enc_ie_called_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, un
strncpy((char *)p+3, (char *)number, strlen((char *)number)); strncpy((char *)p+3, (char *)number, strlen((char *)number));
} }
void dec_ie_called_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, unsigned char *number, int number_len, int nt, struct misdn_bchannel *bc) void dec_ie_called_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, char *number, int number_len, int nt, struct misdn_bchannel *bc)
{ {
*type = -1; *type = -1;
*plan = -1; *plan = -1;
@ -400,7 +400,7 @@ void dec_ie_called_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, u
/* IE_CALLING_PN */ /* IE_CALLING_PN */
void enc_ie_calling_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number, int nt, struct misdn_bchannel *bc) void enc_ie_calling_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, char *number, int nt, struct misdn_bchannel *bc)
{ {
unsigned char *p; unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@ -455,7 +455,7 @@ void enc_ie_calling_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, i
} }
} }
void dec_ie_calling_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len, int nt, struct misdn_bchannel *bc) void dec_ie_calling_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, char *number, int number_len, int nt, struct misdn_bchannel *bc)
{ {
*type = -1; *type = -1;
*plan = -1; *plan = -1;
@ -502,7 +502,7 @@ void dec_ie_calling_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan,
/* IE_CONNECTED_PN */ /* IE_CONNECTED_PN */
void enc_ie_connected_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number, int nt, struct misdn_bchannel *bc) void enc_ie_connected_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, char *number, int nt, struct misdn_bchannel *bc)
{ {
unsigned char *p; unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@ -557,7 +557,7 @@ void enc_ie_connected_pn(unsigned char **ntmode, msg_t *msg, int type, int plan,
} }
} }
void dec_ie_connected_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len, int nt, struct misdn_bchannel *bc) void dec_ie_connected_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, char *number, int number_len, int nt, struct misdn_bchannel *bc)
{ {
*type = -1; *type = -1;
*plan = -1; *plan = -1;

@ -279,7 +279,7 @@ void init_flip_bits(void)
unsigned char * flip_buf_bits ( unsigned char * buf , int len) unsigned char * flip_buf_bits ( unsigned char * buf , int len)
{ {
int i; int i;
char * start = buf; unsigned char * start = buf;
for (i = 0 ; i < len; i++) { for (i = 0 ; i < len; i++) {
buf[i] = flip_table[buf[i]]; buf[i] = flip_table[buf[i]];
@ -2197,12 +2197,12 @@ static void misdn_save_data(int id, char *p1, int l1, char *p2, int l2)
void misdn_tx_jitter(struct misdn_bchannel *bc, int len) void misdn_tx_jitter(struct misdn_bchannel *bc, int len)
{ {
char buf[4096 + mISDN_HEADER_LEN]; unsigned char buf[4096 + mISDN_HEADER_LEN];
char *data=&buf[mISDN_HEADER_LEN]; unsigned char *data=&buf[mISDN_HEADER_LEN];
iframe_t *txfrm= (iframe_t*)buf; iframe_t *txfrm= (iframe_t*)buf;
int jlen, r; int jlen, r;
jlen=cb_jb_empty(bc,data,len); jlen=cb_jb_empty(bc,(char*)data,len);
if (jlen) { if (jlen) {
#ifdef MISDN_SAVE_DATA #ifdef MISDN_SAVE_DATA
@ -3988,7 +3988,7 @@ int misdn_lib_tx2misdn_frm(struct misdn_bchannel *bc, void *data, int len)
return -1; return -1;
} }
char buf[4096 + mISDN_HEADER_LEN]; unsigned char buf[4096 + mISDN_HEADER_LEN];
iframe_t *frm= (iframe_t*)buf; iframe_t *frm= (iframe_t*)buf;
int r; int r;
@ -4294,43 +4294,36 @@ void misdn_lib_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2)
int conf_id=bc1->pid +1; int conf_id=bc1->pid +1;
cb_log(4, bc1->port, "I Send: BRIDGE from:%d to:%d\n",bc1->port,bc2->port); cb_log(4, bc1->port, "I Send: BRIDGE from:%d to:%d\n",bc1->port,bc2->port);
struct misdn_bchannel *bc_list[]={ bc1->conf_id=conf_id;
bc1,bc2,NULL cb_log(4, bc1->port, " --> bc_addr:%x\n",bc1->addr);
}; if (bc1->bc_state==BCHAN_ACTIVATED)
struct misdn_bchannel **bc; misdn_join_conf(bc1,conf_id);
else
for (bc=bc_list; *bc; *bc++) { bc_next_state_change(bc1,BCHAN_BRIDGED);
(*bc)->conf_id=conf_id; /*and again*/
cb_log(4, (*bc)->port, " --> bc_addr:%x\n",(*bc)->addr); bc2->conf_id=conf_id;
cb_log(4, bc2->port, " --> bc_addr:%x\n",bc2->addr);
switch((*bc)->bc_state) { if (bc2->bc_state==BCHAN_ACTIVATED)
case BCHAN_ACTIVATED: misdn_join_conf(bc2,conf_id);
misdn_join_conf(*bc,conf_id); else
break; bc_next_state_change(bc2,BCHAN_BRIDGED);
default:
bc_next_state_change(*bc,BCHAN_BRIDGED);
break;
}
}
} }
void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2) void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2)
{ {
if ( bc1->bc_state == BCHAN_BRIDGED)
misdn_split_conf( bc1, bc1->conf_id);
else
cb_log( 2, bc1->port, "BC not bridged (state:%s) so not splitting it\n",bc_state2str(bc1->bc_state));
struct misdn_bchannel *bc_list[]={ /*again*/
bc1,bc2,NULL
}; if ( bc2->bc_state == BCHAN_BRIDGED)
struct misdn_bchannel **bc; misdn_split_conf( bc2, bc2->conf_id);
else
for (bc=bc_list; *bc; *bc++) { cb_log( 2, bc1->port, "BC not bridged (state:%s) so not splitting it\n",bc_state2str(bc2->bc_state));
if ( (*bc)->bc_state == BCHAN_BRIDGED){
misdn_split_conf( *bc, (*bc)->conf_id);
} else {
cb_log( 2, (*bc)->port, "BC not bridged (state:%s) so not splitting it\n",bc_state2str((*bc)->bc_state));
}
}
} }

@ -329,17 +329,17 @@ struct misdn_bchannel {
int hdlc; int hdlc;
/* V110 */ /* V110 */
unsigned char display[84]; char display[84];
unsigned char msn[32]; char msn[32];
unsigned char oad[32]; char oad[32];
unsigned char rad[32]; char rad[32];
unsigned char dad[32]; char dad[32];
unsigned char cad[32]; char cad[32];
unsigned char orig_dad[32]; char orig_dad[32];
unsigned char keypad[32]; char keypad[32];
unsigned char info_dad[64]; char info_dad[64];
unsigned char infos_pending[64]; char infos_pending[64];
/* unsigned char info_keypad[32]; */ /* unsigned char info_keypad[32]; */
/* unsigned char clisub[24]; */ /* unsigned char clisub[24]; */

Loading…
Cancel
Save