[Asterisk-cvs]
libpri ChangeLog, 1.4.2.6, 1.4.2.7 libpri.h, 1.32.2.1,
1.32.2.2 q931.c, 1.87.2.1, 1.87.2.2
russell at lists.digium.com
russell at lists.digium.com
Mon Apr 4 02:27:04 CDT 2005
Update of /usr/cvsroot/libpri
In directory mongoose.digium.com:/tmp/cvs-serv30766
Modified Files:
Tag: v1-0
ChangeLog libpri.h q931.c
Log Message:
fix compile warnings for gcc4 (bug #3915)
Index: ChangeLog
===================================================================
RCS file: /usr/cvsroot/libpri/ChangeLog,v
retrieving revision 1.4.2.6
retrieving revision 1.4.2.7
diff -u -d -r1.4.2.6 -r1.4.2.7
--- ChangeLog 10 Mar 2005 16:44:39 -0000 1.4.2.6
+++ ChangeLog 4 Apr 2005 07:19:58 -0000 1.4.2.7
@@ -1,3 +1,4 @@
+ -- fix compile warnings for gcc4
libpri 1.0.7
-- No Changes
libpri 1.0.6
Index: libpri.h
===================================================================
RCS file: /usr/cvsroot/libpri/libpri.h,v
retrieving revision 1.32.2.1
retrieving revision 1.32.2.2
diff -u -d -r1.32.2.1 -r1.32.2.2
--- libpri.h 27 Oct 2004 14:45:07 -0000 1.32.2.1
+++ libpri.h 4 Apr 2005 07:19:59 -0000 1.32.2.2
@@ -364,7 +364,7 @@
/* Give a name to a given event ID */
extern char *pri_event2str(int id);
-/* Give a name toa node type */
+/* Give a name to a node type */
extern char *pri_node2str(int id);
/* Give a name to a switch type */
@@ -373,9 +373,6 @@
/* Print an event */
extern void pri_dump_event(struct pri *pri, pri_event *e);
-/* Turn an event ID into a string */
-extern char *pri_event2str(int e);
-
/* Turn presentation into a string */
extern char *pri_pres2str(int pres);
Index: q931.c
===================================================================
RCS file: /usr/cvsroot/libpri/q931.c,v
retrieving revision 1.87.2.1
retrieving revision 1.87.2.2
diff -u -d -r1.87.2.1 -r1.87.2.2
--- q931.c 5 Oct 2004 02:19:11 -0000 1.87.2.1
+++ q931.c 4 Apr 2005 07:19:59 -0000 1.87.2.2
@@ -36,7 +36,7 @@
struct msgtype {
int msgnum;
- unsigned char *name;
+ char *name;
int mandies[MAX_MAND_IES];
};
@@ -775,7 +775,7 @@
static FUNC_DUMP(dump_called_party_number)
{
- char cnum[256];
+ unsigned char cnum[256];
q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3);
pri_message("%c Called Number (len=%2d) [ Ext: %d TON: %s (%d) NPI: %s (%d) '%s' ]\n",
@@ -784,7 +784,7 @@
static FUNC_DUMP(dump_called_party_subaddr)
{
- char cnum[256];
+ unsigned char cnum[256];
q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3);
pri_message("%c Called Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n",
prefix, len, ie->data[0] >> 7,
@@ -794,7 +794,7 @@
static FUNC_DUMP(dump_calling_party_number)
{
- char cnum[256];
+ unsigned char cnum[256];
if (ie->data[0] & 0x80)
q931_get_number(cnum, sizeof(cnum), ie->data + 1, len - 3);
else
@@ -808,7 +808,7 @@
static FUNC_DUMP(dump_calling_party_subaddr)
{
- char cnum[256];
+ unsigned char cnum[256];
q931_get_number(cnum, sizeof(cnum), ie->data + 2, len - 4);
pri_message("%c Calling Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n",
prefix, len, ie->data[0] >> 7,
@@ -818,7 +818,7 @@
static FUNC_DUMP(dump_redirecting_number)
{
- char cnum[256];
+ unsigned char cnum[256];
int i = 0;
/* To follow Q.931 (4.5.1), we must search for start of octet 4 by
walking through all bytes until one with ext bit (8) set to 1 */
@@ -845,7 +845,7 @@
static FUNC_DUMP(dump_connected_number)
{
- char cnum[256];
+ unsigned char cnum[256];
int i = 0;
/* To follow Q.931 (4.5.1), we must search for start of octet 4 by
walking through all bytes until one with ext bit (8) set to 1 */
@@ -887,14 +887,14 @@
}
}
while(!(ie->data[i++] & 0x80));
- q931_get_number(call->redirectingnum, sizeof(call->redirectingnum), ie->data + i, ie->len - i);
+ q931_get_number((unsigned char *) call->redirectingnum, sizeof(call->redirectingnum), ie->data + i, ie->len - i);
return 0;
}
static FUNC_DUMP(dump_redirecting_subaddr)
{
- char cnum[256];
+ unsigned char cnum[256];
q931_get_number(cnum, sizeof(cnum), ie->data + 2, len - 4);
pri_message("%c Redirecting Sub-Address (len=%2d) [ Ext: %d Type: %s (%d) O: %d '%s' ]\n",
prefix, len, ie->data[0] >> 7,
@@ -905,14 +905,14 @@
static FUNC_RECV(receive_calling_party_subaddr)
{
/* copy digits to call->callingsubaddr */
- q931_get_number(call->callingsubaddr, sizeof(call->callingsubaddr), ie->data + 2, len - 4);
+ q931_get_number((unsigned char *) call->callingsubaddr, sizeof(call->callingsubaddr), ie->data + 2, len - 4);
return 0;
}
static FUNC_RECV(receive_called_party_number)
{
/* copy digits to call->callednum */
- q931_get_number(call->callednum, sizeof(call->callednum), ie->data + 1, len - 3);
+ q931_get_number((unsigned char *) call->callednum, sizeof(call->callednum), ie->data + 1, len - 3);
call->calledplan = ie->data[0] & 0x7f;
return 0;
}
@@ -933,11 +933,11 @@
extbit = (ie->data[0] >> 7) & 0x01;
if (extbit) {
- q931_get_number(call->callernum, sizeof(call->callernum), ie->data + 1, len - 3);
+ q931_get_number((unsigned char *) call->callernum, sizeof(call->callernum), ie->data + 1, len - 3);
call->callerpres = 0; /* PI presentation allowed
SI user-provided, not screened */
} else {
- q931_get_number(call->callernum, sizeof(call->callernum), ie->data + 2, len - 4);
+ q931_get_number((unsigned char *) call->callernum, sizeof(call->callernum), ie->data + 2, len - 4);
call->callerpres = ie->data[1] & 0x7f;
}
return 0;
@@ -966,7 +966,7 @@
{
call->useruserprotocoldisc = ie->data[0] & 0xff;
if (call->useruserprotocoldisc == 4) /* IA5 */
- q931_get_number(call->useruserinfo, sizeof(call->useruserinfo), ie->data + 1, len - 3);
+ q931_get_number((unsigned char *) call->useruserinfo, sizeof(call->useruserinfo), ie->data + 1, len - 3);
return 0;
}
@@ -1030,7 +1030,7 @@
data++;
len--;
}
- q931_get_number(call->callername, sizeof(call->callername), data, len - 2);
+ q931_get_number((unsigned char *) call->callername, sizeof(call->callername), data, len - 2);
return 0;
}
@@ -1064,7 +1064,7 @@
return 0;
}
if (ie->data[13] + 14 == ie->len) {
- q931_get_number(call->callername, sizeof(call->callername) - 1, ie->data + 14, ie->len - 14);
+ q931_get_number((unsigned char *) call->callername, sizeof(call->callername) - 1, ie->data + 14, ie->len - 14);
}
return 0;
}
@@ -1816,7 +1816,7 @@
return -1;
}
-static void init_header(struct pri *pri, q931_call *call, char *buf, q931_h **hb, q931_mh **mhb, int *len)
+static void init_header(struct pri *pri, q931_call *call, unsigned char *buf, q931_h **hb, q931_mh **mhb, int *len)
{
/* Returns header and message header and modifies length in place */
q931_h *h = (q931_h *)buf;
More information about the svn-commits
mailing list