Compare commits

..

29 Commits
1.0.4 ... 1.0.8

Author SHA1 Message Date
Kevin P. Fleming
eb5ad5d8fc remove CVS ignore lists
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.0.8@267 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-29 18:40:06 +00:00
Kevin P. Fleming
d827f851b4 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.0.8@266 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-29 18:39:18 +00:00
Kevin P. Fleming
f947fe7f40 automatic tag renames
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.0.8@263 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-11-27 04:17:23 +00:00
Admin Commit
5aa70b6691 This commit was manufactured by cvs2svn to create tag 'v1-0-8'.
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/v1-0-8@233 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-23 01:01:50 +00:00
Russell Bryant
9ed9295cd5 update for 1.0.8
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@232 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-06-23 01:01:50 +00:00
Russell Bryant
803f8b1e99 add missing argument (bug #4405)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@224 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-05-29 15:10:34 +00:00
Russell Bryant
64301d47eb get rid of warning about missing .depend (bug #4061)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@216 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-05-11 03:37:29 +00:00
Russell Bryant
7f75e2b80a fix compile warnings for gcc4 (bug #3915)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@205 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-04-04 07:19:59 +00:00
Russell Bryant
4be7589429 update for 1.0.7 - no changes here, but might as well keep them consistent
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@198 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-03-10 16:44:39 +00:00
Russell Bryant
5bd165c51c little update ... some of the names weren't totally correct in the Asterisk part,
so i'm just taking them out of all of it for this time


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@192 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-02-24 21:29:55 +00:00
Russell Bryant
c89077c707 changelog for 1.0.6, thanks file!
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@191 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-02-24 21:06:15 +00:00
Russell Bryant
c94bb651cb Fix mkdep for dynamic library version (bug #3497)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@189 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-02-07 03:48:39 +00:00
Russell Bryant
030e422d90 update for 1.0.4
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@177 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2005-01-14 05:14:27 +00:00
Russell Bryant
31543e7d4b fix for SELinux (bug #3147)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@173 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-12-27 01:29:12 +00:00
Russell Bryant
af8e88d31d get rid of compile warning (bug #3054)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@166 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-12-15 18:06:38 +00:00
Russell Bryant
1776a47991 update ChangeLog for 1.0.3 release
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@161 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-12-07 04:57:49 +00:00
Russell Bryant
1b53ca3726 Fix Endian for FreeBSD (bug #2679)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@153 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-29 14:12:45 +00:00
James Golovich
f678b0be15 Backport libpri part of bug 2703 to 1.0
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@148 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-27 14:45:07 +00:00
Russell Bryant
19821ae420 add GPL (bug #2654)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@146 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-14 23:04:53 +00:00
Russell Bryant
18deddad8a update readme (bug #2654)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@145 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-14 23:04:22 +00:00
Admin Commit
753377c57d This commit was manufactured by cvs2svn to create branch 'v1-0'.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@143 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-14 18:23:47 +00:00
Russell Bryant
fd6237ebb6 Fix for PRES_NUMBER_NOT_AVAILABLE is not defined in pri_pres2str (bug #2567)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@141 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-05 02:19:11 +00:00
Admin Commit
dda51ee0bc This commit was manufactured by cvs2svn to create branch 'v1-0'.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/v1-0@140 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-10-05 02:19:11 +00:00
Mark Spencer
2b7b7e2e68 Make sure retranstimer is set to 0
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@135 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-09-20 13:29:37 +00:00
Mark Spencer
9682be31fb Merge BKW's ANI2 patch (bug #2450)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@134 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-09-17 04:02:16 +00:00
Mark Spencer
ea146a8f6f Check for existance of *caller* number when sending caller, not called number (bug #2453)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@133 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-09-16 20:38:13 +00:00
Mark Spencer
12155fa6c3 Minor Makefile fixes for libpri (bug #2330)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@132 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-08-31 17:40:59 +00:00
Mark Spencer
96535a0c17 Fix redirecting number (bug #2146)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@131 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-08-25 06:20:50 +00:00
Mark Spencer
cac414333f Matt's requested fix
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@130 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2004-07-23 16:20:06 +00:00
5 changed files with 43 additions and 25 deletions

View File

@@ -1,3 +1,10 @@
libpri 1.0.8
-- fix compile warnings for gcc4
libpri 1.0.7
-- No Changes
libpri 1.0.6
-- Dependencies from .depend were valid from static libary only, not dynamic. 'mkdep'
has been fixed to support the dynamic library version.
libpri 1.0.4
-- Makefile fix for SELinux
libpri 1.0.3

View File

@@ -90,7 +90,9 @@ testprilib: testprilib.o
pridump: pridump.o
$(CC) -o pridump pridump.o -L. -lpri -lzap $(CFLAGS)
ifneq ($(wildcard .depend),)
include .depend
endif
%.lo : %.c
$(CC) -fPIC $(CFLAGS) -o $@ -c $<

View File

@@ -364,7 +364,7 @@ pri_event *pri_check_event(struct pri *pri);
/* 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 @@ extern char *pri_switch2str(int id);
/* 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);

18
mkdep
View File

@@ -100,10 +100,22 @@ if [ $append = 1 ]; then
rm -rf $DTMP
exit 1
fi
else
mv $TMP $D
cat $TMP | sed -e 's/\.o:/.lo:/g' >>$D
if [ $? != 0 ]; then
echo 'mkdep: rename failed.'
echo 'mkdep: append failed.'
rm -rf $DTMP
exit 1
fi
else
cat $TMP > $D
if [ $? != 0 ]; then
echo 'mkdep: overwrite failed.'
rm -rf $DTMP
exit 1
fi
cat $TMP | sed -e 's/\.o:/.lo:/g' >>$D
if [ $? != 0 ]; then
echo 'mkdep: append failed.'
rm -rf $DTMP
exit 1
fi

36
q931.c
View File

@@ -36,7 +36,7 @@
struct msgtype {
int msgnum;
unsigned char *name;
char *name;
int mandies[MAX_MAND_IES];
};
@@ -775,7 +775,7 @@ static void q931_get_number(unsigned char *num, int maxlen, unsigned char *src,
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_number)
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_called_party_subaddr)
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_number)
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_calling_party_subaddr)
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_redirecting_number)
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 @@ static FUNC_RECV(receive_redirecting_number)
}
}
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_DUMP(dump_redirecting_subaddr)
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 @@ static FUNC_RECV(receive_calling_party_number)
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 @@ static FUNC_RECV(receive_user_user)
{
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 @@ static FUNC_RECV(receive_display)
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 @@ static FUNC_RECV(receive_facility)
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 @@ static int q931_handle_ie(int codeset, struct pri *pri, q931_call *c, int msg, q
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;
@@ -2378,7 +2378,7 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause)
pri_error("q931_hangup shouldn't be called in this state, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
break;
default:
pri_error("We're not yet handling hanging up when our state is %d, contact support@digium.com, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
pri_error("We're not yet handling hanging up when our state is %d, contact support@digium.com, ourstate %s, peerstate %s\n",c->ourcallstate,callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
return -1;
}
/* we did handle hangup properly at this point */