[asterisk-commits] moy: branch moy/mfcr2 r151978 - /team/moy/mfcr2/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Oct 25 19:07:15 CDT 2008
Author: moy
Date: Sat Oct 25 19:07:15 2008
New Revision: 151978
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151978
Log:
fixed dahdi restart and added proper description when R2 support is present
Modified:
team/moy/mfcr2/channels/chan_dahdi.c
Modified: team/moy/mfcr2/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/channels/chan_dahdi.c?view=diff&rev=151978&r1=151977&r2=151978
==============================================================================
--- team/moy/mfcr2/channels/chan_dahdi.c (original)
+++ team/moy/mfcr2/channels/chan_dahdi.c Sat Oct 25 19:07:15 2008
@@ -163,11 +163,25 @@
#define NEED_MFDETECT(p) (((p)->sig == SIG_FEATDMF) || ((p)->sig == SIG_FEATDMF_TA) || ((p)->sig == SIG_E911) || ((p)->sig == SIG_FGC_CAMA) || ((p)->sig == SIG_FGC_CAMAMF) || ((p)->sig == SIG_FEATB))
static const char tdesc[] = "DAHDI Telephony Driver"
+#if defined(HAVE_PRI) || defined(HAVE_SS7) || defined(HAVE_OPENR2)
+ " w/"
+#endif
#ifdef HAVE_PRI
- " w/PRI"
+ "PRI"
#endif
#ifdef HAVE_SS7
- " w/SS7"
+ #ifdef HAVE_PRI
+ " & SS7"
+ #else
+ "SS7"
+ #endif
+#endif
+#ifdef HAVE_OPENR2
+ #if defined(HAVE_PRI) || defined(HAVE_SS7)
+ " & MFC/R2"
+ #else
+ "MFCR2"
+ #endif
#endif
;
@@ -1154,7 +1168,6 @@
mfcr2_cur_max_ani = 10;
mfcr2_cur_max_dnis = 4;
mfcr2_cur_get_ani_first = 0;
- mfcr2_cur_context_index = 0;
mfcr2_cur_call_files = 0;
mfcr2_cur_allow_collect_calls = 0;
mfcr2_cur_forced_release = 0;
@@ -9142,7 +9155,7 @@
}
#endif
#ifdef HAVE_OPENR2
- if (chan_sig == SIG_MFCR2 && !reloading) {
+ if (chan_sig == SIG_MFCR2 && reloading != 1) {
char logdir[OR2_MAX_LOGDIR];
struct dahdi_mfcr2 *zap_r2;
int threshold = 0;
@@ -14941,7 +14954,7 @@
}
}
#ifdef HAVE_OPENR2
- if (!reload && r2links[mfcr2_cur_context_index].protocol_context) {
+ if (reload != 1 && r2links[mfcr2_cur_context_index].protocol_context) {
mfcr2_cur_context_index++;
}
#endif
@@ -16129,7 +16142,7 @@
}
#endif
#ifdef HAVE_OPENR2
- if (!reload) {
+ if (reload != 1) {
int x;
for (x = 0; x < NUM_SPANS; x++) {
if (r2links[x].protocol_context) {
@@ -16336,20 +16349,6 @@
* AST_MODULE_INFO(, , "DAHDI Telephony"
*/
-#ifdef HAVE_PRI
-#ifdef HAVE_SS7
-#define tdesc "DAHDI Telephony w/PRI & SS7"
-#else
-#define tdesc "DAHDI Telephony w/PRI"
-#endif
-#else
-#ifdef HAVE_SS7
-#define tdesc "DAHDI Telephony w/SS7"
-#else
-#define tdesc "DAHDI Telephony"
-#endif
-#endif
-
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, tdesc,
.load = load_module,
.unload = unload_module,
More information about the asterisk-commits
mailing list