pri show debug feature (bug 4210)

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@215 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Matthew Fredrickson 2005-05-10 21:02:41 +00:00
parent 099ee35431
commit 3803535593
2 changed files with 12 additions and 0 deletions

View File

@ -408,6 +408,9 @@ extern void pri_set_nsf(struct pri *pri, int nsf);
/* Set debug parameters on PRI -- see above debug definitions */
extern void pri_set_debug(struct pri *pri, int debug);
/* Get debug parameters on PRI -- see above debug definitions */
extern int pri_get_debug(struct pri *pri);
/* Run PRI on the given D-channel, taking care of any events that
need to be handled. If block is set, it will block until an event
occurs which needs to be handled */

9
pri.c
View File

@ -391,6 +391,15 @@ void pri_set_debug(struct pri *pri, int debug)
pri_set_debug(pri->subchannel, debug);
}
int pri_get_debug(struct pri *pri)
{
if (!pri)
return -1;
if (pri->subchannel)
return pri_get_debug(pri->subchannel);
return pri->debug;
}
int pri_acknowledge(struct pri *pri, q931_call *call, int channel, int info)
{
if (!pri || !call)