[asterisk-commits] nadi: trunk r39479 - in /trunk/channels: ./
misdn/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Aug 9 02:24:22 MST 2006
Author: nadi
Date: Wed Aug 9 04:24:21 2006
New Revision: 39479
URL: http://svn.digium.com/view/asterisk?rev=39479&view=rev
Log:
fixing compile warnings, renaming config option "overlap_dial" to "overlapdial"
Modified:
trunk/channels/misdn/asn1.c
trunk/channels/misdn/asn1.h
trunk/channels/misdn/ie.c
trunk/channels/misdn/isdn_lib.c
trunk/channels/misdn/isdn_lib.h
trunk/channels/misdn/isdn_msg_parser.c
trunk/channels/misdn_config.c
Modified: trunk/channels/misdn/asn1.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/asn1.c?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/asn1.c (original)
+++ trunk/channels/misdn/asn1.c Wed Aug 9 04:24:21 2006
@@ -48,7 +48,7 @@
return p - dest;
}
-int _enc_num_string (__u8 *dest, __u8 *nd, __u8 len, int tag)
+int _enc_num_string (__u8 *dest, char *nd, __u8 len, int tag)
{
__u8 *p;
int i;
Modified: trunk/channels/misdn/asn1.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/asn1.h?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/asn1.h (original)
+++ trunk/channels/misdn/asn1.h Wed Aug 9 04:24:21 2006
@@ -42,7 +42,7 @@
int _enc_bool (__u8 *dest, __u32 i, int tag);
int _enc_int (__u8 *dest, __u32 i, int tag);
int _enc_enum (__u8 *dest, __u32 i, int tag);
-int _enc_num_string (__u8 *dest, __u8 *nd, __u8 len, int tag);
+int _enc_num_string (__u8 *dest, char *nd, __u8 len, int tag);
int _enc_sequence_start (__u8 *dest, __u8 **id, int tag);
int _enc_sequence_end (__u8 *dest, __u8 *id, int tag_dummy);
Modified: trunk/channels/misdn/ie.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/ie.c?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/ie.c (original)
+++ trunk/channels/misdn/ie.c Wed Aug 9 04:24:21 2006
@@ -33,7 +33,7 @@
#define MISDN_IE_DEBG 0
/* support stuff */
-static void strnncpy(unsigned char *dest, unsigned char *src, int len, int dst_len)
+static void strnncpy(char *dest, char *src, int len, int dst_len)
{
if (len > dst_len-1)
len = dst_len-1;
@@ -260,7 +260,7 @@
/* 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;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -299,7 +299,7 @@
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];
int i;
@@ -335,7 +335,7 @@
/* 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;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -371,7 +371,7 @@
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;
*plan = -1;
@@ -393,14 +393,14 @@
*type = (p[1]&0x70) >> 4;
*plan = p[1] & 0xf;
- strnncpy(number, p+2, p[0]-1, number_len);
+ strnncpy(number, (char *)p+2, p[0]-1, number_len);
if (MISDN_IE_DEBG) printf(" type=%d plan=%d number='%s'\n", *type, *plan, number);
}
/* 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;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -455,7 +455,7 @@
}
}
-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;
*plan = -1;
@@ -488,10 +488,10 @@
}
*present = (p[2]&0x60) >> 5;
*screen = p[2] & 0x3;
- strnncpy(number, p+3, p[0]-2, number_len);
+ strnncpy(number, (char *)p+3, p[0]-2, number_len);
} else
{
- strnncpy(number, p+2, p[0]-1, number_len);
+ strnncpy(number, (char *)p+2, p[0]-1, number_len);
/* SPECIAL workarround for IBT software bug */
/* if (number[0]==0x80) */
/* strcpy((char *)number, (char *)number+1); */
@@ -502,7 +502,7 @@
/* 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;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -557,7 +557,7 @@
}
}
-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;
*plan = -1;
@@ -590,10 +590,10 @@
}
*present = (p[2]&0x60) >> 5;
*screen = p[2] & 0x3;
- strnncpy(number, p+3, p[0]-2, number_len);
+ strnncpy(number, (char *)p+3, p[0]-2, number_len);
} else
{
- strnncpy(number, p+2, p[0]-1, number_len);
+ strnncpy(number, (char *)p+2, p[0]-1, number_len);
}
if (MISDN_IE_DEBG) printf(" type=%d plan=%d present=%d screen=%d number='%s'\n", *type, *plan, *present, *screen, number);
@@ -876,7 +876,7 @@
/* IE_DISPLAY */
-void enc_ie_display(unsigned char **ntmode, msg_t *msg, unsigned char *display, int nt, struct misdn_bchannel *bc)
+void enc_ie_display(unsigned char **ntmode, msg_t *msg, char *display, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -907,7 +907,7 @@
strncpy((char *)p+2, (char *)display, strlen((char *)display));
}
-void dec_ie_display(unsigned char *p, Q931_info_t *qi, unsigned char *display, int display_len, int nt, struct misdn_bchannel *bc)
+void dec_ie_display(unsigned char *p, Q931_info_t *qi, char *display, int display_len, int nt, struct misdn_bchannel *bc)
{
*display = '\0';
@@ -925,14 +925,14 @@
return;
}
- strnncpy(display, p+1, p[0], display_len);
+ strnncpy(display, (char *)p+1, p[0], display_len);
if (MISDN_IE_DEBG) printf(" display='%s'\n", display);
}
/* IE_KEYPAD */
-void enc_ie_keypad(unsigned char **ntmode, msg_t *msg, unsigned char *keypad, int nt, struct misdn_bchannel *bc)
+void enc_ie_keypad(unsigned char **ntmode, msg_t *msg, char *keypad, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -957,7 +957,7 @@
strncpy((char *)p+2, (char *)keypad, strlen((char *)keypad));
}
-void dec_ie_keypad(unsigned char *p, Q931_info_t *qi, unsigned char *keypad, int keypad_len, int nt, struct misdn_bchannel *bc)
+void dec_ie_keypad(unsigned char *p, Q931_info_t *qi, char *keypad, int keypad_len, int nt, struct misdn_bchannel *bc)
{
*keypad = '\0';
@@ -975,7 +975,7 @@
return;
}
- strnncpy(keypad, p+1, p[0], keypad_len);
+ strnncpy(keypad, (char *)p+1, p[0], keypad_len);
if (MISDN_IE_DEBG) printf(" keypad='%s'\n", keypad);
}
@@ -1098,7 +1098,7 @@
/* IE_REDIR_NR (redirecting = during MT_SETUP) */
-void enc_ie_redir_nr(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, int reason, unsigned char *number, int nt, struct misdn_bchannel *bc)
+void enc_ie_redir_nr(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, int reason, char *number, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -1172,7 +1172,7 @@
}
}
-void dec_ie_redir_nr(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, int *reason, unsigned char *number, int number_len, int nt, struct misdn_bchannel *bc)
+void dec_ie_redir_nr(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, int *reason, char *number, int number_len, int nt, struct misdn_bchannel *bc)
{
*type = -1;
*plan = -1;
@@ -1204,14 +1204,14 @@
if (!(p[2] & 0x80))
{
*reason = p[3] & 0x0f;
- strnncpy(number, p+4, p[0]-3, number_len);
+ strnncpy(number, (char *)p+4, p[0]-3, number_len);
} else
{
- strnncpy(number, p+3, p[0]-2, number_len);
+ strnncpy(number, (char *)p+3, p[0]-2, number_len);
}
} else
{
- strnncpy(number, p+2, p[0]-1, number_len);
+ strnncpy(number, (char *)p+2, p[0]-1, number_len);
}
if (MISDN_IE_DEBG) printf(" type=%d plan=%d present=%d screen=%d reason=%d number='%s'\n", *type, *plan, *present, *screen, *reason, number);
@@ -1219,7 +1219,7 @@
/* IE_REDIR_DN (redirection = during MT_NOTIFY) */
-void enc_ie_redir_dn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, unsigned char *number, int nt, struct misdn_bchannel *bc)
+void enc_ie_redir_dn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, char *number, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
/* Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); */
@@ -1270,7 +1270,7 @@
}
}
-void dec_ie_redir_dn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, unsigned char *number, int number_len, int nt, struct misdn_bchannel *bc)
+void dec_ie_redir_dn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, char *number, int number_len, int nt, struct misdn_bchannel *bc)
{
*type = -1;
*plan = -1;
@@ -1297,10 +1297,10 @@
if (!(p[1] & 0x80))
{
*present = (p[2]&0x60) >> 5;
- strnncpy(number, p+3, p[0]-2, number_len);
+ strnncpy(number, (char *)p+3, p[0]-2, number_len);
} else
{
- strnncpy(number, p+2, p[0]-1, number_len);
+ strnncpy(number, (char *)p+2, p[0]-1, number_len);
}
if (MISDN_IE_DEBG) printf(" type=%d plan=%d present=%d number='%s'\n", *type, *plan, *present, number);
@@ -1309,7 +1309,7 @@
/* IE_USERUSER */
-void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, unsigned char *user, int user_len, int nt, struct misdn_bchannel *bc)
+void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, char *user, int user_len, int nt, struct misdn_bchannel *bc)
{
unsigned char *p;
Q931_info_t *qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
@@ -1349,7 +1349,7 @@
memcpy(p+3, user, user_len);
}
-void dec_ie_useruser(unsigned char *p, Q931_info_t *qi, int *protocol, unsigned char *user, int *user_len, int nt, struct misdn_bchannel *bc)
+void dec_ie_useruser(unsigned char *p, Q931_info_t *qi, int *protocol, char *user, int *user_len, int nt, struct misdn_bchannel *bc)
{
char debug[768];
int i;
Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Wed Aug 9 04:24:21 2006
@@ -211,8 +211,8 @@
static struct misdn_lib *glob_mgr;
-unsigned char tone_425_flip[TONE_425_SIZE];
-unsigned char tone_silence_flip[TONE_SILENCE_SIZE];
+char tone_425_flip[TONE_425_SIZE];
+char tone_silence_flip[TONE_SILENCE_SIZE];
static void misdn_lib_isdn_event_catcher(void *arg);
static int handle_event_nt(void *dat, void *arg);
@@ -292,13 +292,13 @@
}
}
-unsigned char * flip_buf_bits ( unsigned char * buf , int len)
+char * flip_buf_bits ( char * buf , int len)
{
int i;
char * start = buf;
for (i = 0 ; i < len; i++) {
- buf[i] = flip_table[buf[i]];
+ buf[i] = flip_table[(unsigned char)buf[i]];
}
return start;
Modified: trunk/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.h?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.h (original)
+++ trunk/channels/misdn/isdn_lib.h Wed Aug 9 04:24:21 2006
@@ -233,7 +233,7 @@
int in_use;
int addr;
- unsigned char * bframe;
+ char * bframe;
int bframe_len;
int time_usec;
@@ -323,17 +323,17 @@
int hdlc;
/* V110 */
- unsigned char display[84];
- unsigned char msn[32];
- unsigned char oad[32];
- unsigned char rad[32];
- unsigned char dad[32];
- unsigned char cad[32];
- unsigned char orig_dad[32];
- unsigned char keypad[32];
-
- unsigned char info_dad[64];
- unsigned char infos_pending[64];
+ char display[84];
+ char msn[32];
+ char oad[32];
+ char rad[32];
+ char dad[32];
+ char cad[32];
+ char orig_dad[32];
+ char keypad[32];
+
+ char info_dad[64];
+ char infos_pending[64];
/* unsigned char info_keypad[32]; */
/* unsigned char clisub[24]; */
Modified: trunk/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_msg_parser.c?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_msg_parser.c (original)
+++ trunk/channels/misdn/isdn_msg_parser.c Wed Aug 9 04:24:21 2006
@@ -162,7 +162,7 @@
{
int type,plan,present, screen;
char id[32];
- dec_ie_calling_pn(setup->CALLING_PN, qi, &type, &plan, &present, &screen, (unsigned char *)id, sizeof(id)-1, nt,bc);
+ dec_ie_calling_pn(setup->CALLING_PN, qi, &type, &plan, &present, &screen, id, sizeof(id)-1, nt,bc);
bc->onumplan=type;
strcpy(bc->oad, id);
@@ -186,13 +186,13 @@
{
int type, plan;
char number[32];
- dec_ie_called_pn(setup->CALLED_PN, (Q931_info_t *)setup, &type, &plan, (unsigned char *)number, sizeof(number)-1, nt,bc);
+ dec_ie_called_pn(setup->CALLED_PN, (Q931_info_t *)setup, &type, &plan, number, sizeof(number)-1, nt,bc);
strcpy(bc->dad, number);
bc->dnumplan=type;
}
{
char keypad[32];
- dec_ie_keypad(setup->KEYPAD, (Q931_info_t *)setup, (unsigned char *)keypad, sizeof(keypad)-1, nt,bc);
+ dec_ie_keypad(setup->KEYPAD, (Q931_info_t *)setup, keypad, sizeof(keypad)-1, nt,bc);
strcpy(bc->keypad, keypad);
}
@@ -204,7 +204,7 @@
{
int type, plan, present, screen, reason;
char id[32];
- dec_ie_redir_nr(setup->REDIR_NR, (Q931_info_t *)setup, &type, &plan, &present, &screen, &reason, (unsigned char *)id, sizeof(id)-1, nt,bc);
+ dec_ie_redir_nr(setup->REDIR_NR, (Q931_info_t *)setup, &type, &plan, &present, &screen, &reason, id, sizeof(id)-1, nt,bc);
strcpy(bc->rad, id);
bc->rnumplan=type;
@@ -373,7 +373,7 @@
{
int type=bc->cpnnumplan, plan=1, present=2, screen=0;
- enc_ie_connected_pn(&connect->CONNECT_PN, msg, type,plan, present, screen, (unsigned char*) bc->cad, nt , bc);
+ enc_ie_connected_pn(&connect->CONNECT_PN, msg, type,plan, present, screen, bc->cad, nt , bc);
}
#if DEBUG
@@ -968,8 +968,8 @@
int type, plan;
char number[32];
char keypad[32];
- dec_ie_called_pn(information->CALLED_PN, (Q931_info_t *)information, &type, &plan, (unsigned char *)number, sizeof(number)-1, nt, bc);
- dec_ie_keypad(information->KEYPAD, (Q931_info_t *)information, (unsigned char *)keypad, sizeof(keypad)-1, nt, bc);
+ dec_ie_called_pn(information->CALLED_PN, (Q931_info_t *)information, &type, &plan, number, sizeof(number)-1, nt, bc);
+ dec_ie_keypad(information->KEYPAD, (Q931_info_t *)information, keypad, sizeof(keypad)-1, nt, bc);
strcpy(bc->info_dad, number);
strcpy(bc->keypad,keypad);
}
Modified: trunk/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn_config.c?rev=39479&r1=39478&r2=39479&view=diff
==============================================================================
--- trunk/channels/misdn_config.c (original)
+++ trunk/channels/misdn_config.c Wed Aug 9 04:24:21 2006
@@ -293,7 +293,7 @@
"\tThis option is only read at loading time of chan_misdn, which\n"
"\tmeans you need to unload and load chan_misdn to change the value,\n"
"\tan Asterisk restart should do the trick." },
- { "overlap_dial", MISDN_CFG_OVERLAP_DIAL, MISDN_CTYPE_BOOLINT, "0", 4,
+ { "overlapdial", MISDN_CFG_OVERLAP_DIAL, MISDN_CTYPE_BOOLINT, "0", 4,
"Enables overlap dial for the given amount of seconds.\n"
"\tPossible values are positive integers or:\n"
"\t yes (= 4 seconds)\n"
More information about the asterisk-commits
mailing list