[asterisk-commits] rmudgett: branch rmudgett/call_waiting r251735 - /team/rmudgett/call_waiting/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 10 17:06:41 CST 2010
Author: rmudgett
Date: Wed Mar 10 17:06:37 2010
New Revision: 251735
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=251735
Log:
Initialize the dahdi_pvt part of the dahdi_pvt/sig_pri_chan private channel structures.
Modified:
team/rmudgett/call_waiting/channels/chan_dahdi.c
team/rmudgett/call_waiting/channels/sig_pri.c
team/rmudgett/call_waiting/channels/sig_pri.h
Modified: team/rmudgett/call_waiting/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/chan_dahdi.c?view=diff&rev=251735&r1=251734&r2=251735
==============================================================================
--- team/rmudgett/call_waiting/channels/chan_dahdi.c (original)
+++ team/rmudgett/call_waiting/channels/chan_dahdi.c Wed Mar 10 17:06:37 2010
@@ -2984,6 +2984,9 @@
ast_module_unref(ast_module_info->self);
}
+#if defined(HAVE_PRI_CALL_WAITING)
+static void my_pri_init_config(void *priv, struct sig_pri_pri *pri);
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri);
static struct sig_pri_callback dahdi_pri_callbacks =
@@ -3002,6 +3005,9 @@
.set_dnid = my_pri_set_dnid,
.set_rdnis = my_pri_set_rdnis,
.new_nobch_intf = dahdi_new_pri_nobch_channel,
+#if defined(HAVE_PRI_CALL_WAITING)
+ .init_config = my_pri_init_config,
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
.get_orig_dialstring = my_get_orig_dialstring,
.make_cc_dialstring = my_pri_make_cc_dialstring,
.update_span_devstate = dahdi_pri_update_span_devstate,
@@ -12257,6 +12263,38 @@
return 0;
}
+
+#if defined(HAVE_PRI)
+#if defined(HAVE_PRI_CALL_WAITING)
+/*!
+ * \internal
+ * \brief Init the private channel configuration using the span controller.
+ * \since 1.8
+ *
+ * \param priv Channel to init the configuration.
+ * \param pri sig_pri PRI control structure.
+ *
+ * \note Assumes the pri->lock is already obtained.
+ *
+ * \return Nothing
+ */
+static void my_pri_init_config(void *priv, struct sig_pri_pri *pri)
+{
+ struct dahdi_pvt *pvt = priv;
+
+ pvt->stripmsd = pri->ch_cfg.stripmsd;
+ pvt->hidecallerid = pri->ch_cfg.hidecallerid;
+ pvt->hidecalleridname = pri->ch_cfg.hidecalleridname;
+ pvt->immediate = pri->ch_cfg.immediate;
+ pvt->priexclusive = pri->ch_cfg.priexclusive;
+ pvt->priindication_oob = pri->ch_cfg.priindication_oob;
+ pvt->use_callerid = pri->ch_cfg.use_callerid;
+ pvt->use_callingpres = pri->ch_cfg.use_callingpres;
+ ast_copy_string(pvt->context, pri->ch_cfg.context, sizeof(pvt->context));
+ ast_copy_string(pvt->mohinterpret, pri->ch_cfg.mohinterpret, sizeof(pvt->mohinterpret));
+}
+#endif /* defined(HAVE_PRI_CALL_WAITING) */
+#endif /* defined(HAVE_PRI) */
#if defined(HAVE_PRI)
/*!
Modified: team/rmudgett/call_waiting/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.c?view=diff&rev=251735&r1=251734&r2=251735
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.c (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.c Wed Mar 10 17:06:37 2010
@@ -1165,11 +1165,13 @@
#if defined(HAVE_PRI_CALL_WAITING)
/*!
* \internal
- * \brief Init the channel configuration using the span controller.
+ * \brief Init the private channel configuration using the span controller.
* \since 1.8
*
* \param pvt Channel to init the configuration.
* \param pri sig_pri PRI control structure.
+ *
+ * \note Assumes the pri->lock is already obtained.
*
* \return Nothing
*/
@@ -1185,6 +1187,10 @@
pvt->use_callingpres = pri->ch_cfg.use_callingpres;
ast_copy_string(pvt->context, pri->ch_cfg.context, sizeof(pvt->context));
ast_copy_string(pvt->mohinterpret, pri->ch_cfg.mohinterpret, sizeof(pvt->mohinterpret));
+
+ if (pri->calls->init_config) {
+ pri->calls->init_config(pvt->chan_pvt, pri);
+ }
}
#endif /* defined(HAVE_PRI_CALL_WAITING) */
Modified: team/rmudgett/call_waiting/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.h?view=diff&rev=251735&r1=251734&r2=251735
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.h (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.h Wed Mar 10 17:06:37 2010
@@ -118,6 +118,7 @@
void (* const set_rdnis)(void *pvt, const char *rdnis);
void (* const queue_control)(void *pvt, int subclass);
int (* const new_nobch_intf)(struct sig_pri_pri *pri);
+ void (* const init_config)(void *pvt, struct sig_pri_pri *pri);
const char *(* const get_orig_dialstring)(void *pvt);
void (* const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size);
void (* const update_span_devstate)(struct sig_pri_pri *pri);
More information about the asterisk-commits
mailing list