[libpri-commits] rmudgett: branch rmudgett/call_waiting r1520 - /team/rmudgett/call_waiting/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Wed Mar 3 15:10:17 CST 2010
Author: rmudgett
Date: Wed Mar 3 15:10:13 2010
New Revision: 1520
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1520
Log:
Convert some boolean struct pri elements to single bit fields.
Converted: service_message_support, overlapdial, and
acceptinbanddisconnect.
Modified:
team/rmudgett/call_waiting/pri.c
team/rmudgett/call_waiting/pri_internal.h
Modified: team/rmudgett/call_waiting/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/pri.c?view=diff&rev=1520&r1=1519&r2=1520
==============================================================================
--- team/rmudgett/call_waiting/pri.c (original)
+++ team/rmudgett/call_waiting/pri.c Wed Mar 3 15:10:13 2010
@@ -241,7 +241,7 @@
if (!pri) {
return -1;
}
- pri->service_message_support = supportflag;
+ pri->service_message_support = supportflag ? 1 : 0;
return 0;
}
@@ -1347,18 +1347,23 @@
/* Set overlap mode */
void pri_set_overlapdial(struct pri *pri,int state)
{
- pri->overlapdial = state;
+ if (pri) {
+ pri->overlapdial = state ? 1 : 0;
+ }
}
void pri_set_chan_mapping_logical(struct pri *pri, int state)
{
- if (pri->switchtype == PRI_SWITCH_QSIG)
- pri->chan_mapping_logical = state;
+ if (pri && pri->switchtype == PRI_SWITCH_QSIG) {
+ pri->chan_mapping_logical = state ? 1 : 0;
+ }
}
void pri_set_inbanddisconnect(struct pri *pri, unsigned int enable)
{
- pri->acceptinbanddisconnect = (enable != 0);
+ if (pri) {
+ pri->acceptinbanddisconnect = (enable != 0);
+ }
}
int pri_fd(struct pri *pri)
Modified: team/rmudgett/call_waiting/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/call_waiting/pri_internal.h?view=diff&rev=1520&r1=1519&r2=1520
==============================================================================
--- team/rmudgett/call_waiting/pri_internal.h (original)
+++ team/rmudgett/call_waiting/pri_internal.h Wed Mar 3 15:10:13 2010
@@ -99,6 +99,9 @@
unsigned int bri:1;
unsigned int acceptinbanddisconnect:1; /* Should we allow inband progress after DISCONNECT? */
unsigned int sendfacility:1;
+ unsigned int overlapdial:1;/* TRUE if we do overlap dialing */
+ unsigned int chan_mapping_logical:1;/* TRUE if do not skip channel 16 (Q.SIG) */
+ unsigned int service_message_support:1;/* TRUE if upper layer supports SERVICE messages */
unsigned int hold_support:1;/* TRUE if upper layer supports call hold. */
unsigned int deflection_support:1;/* TRUE if upper layer supports call deflection/rerouting. */
unsigned int cc_support:1;/* TRUE if upper layer supports call completion. */
@@ -157,15 +160,6 @@
* D channel control structure.
*/
q931_call *dummy_call;
-
- /* do we do overlap dialing */
- int overlapdial;
-
- /* do we support SERVICE messages */
- int service_message_support;
-
- /* do not skip channel 16 */
- int chan_mapping_logical;
#ifdef LIBPRI_COUNTERS
/* q921/q931 packet counters */
More information about the libpri-commits
mailing list