[svn-commits] moy: branch moy/mfcr2-1.4 r147455 - /team/moy/mfcr2-1.4/channels/chan_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 7 22:59:00 CDT 2008


Author: moy
Date: Tue Oct  7 22:59:00 2008
New Revision: 147455

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147455
Log:
added small fixes to compile in dev mode

Modified:
    team/moy/mfcr2-1.4/channels/chan_zap.c

Modified: team/moy/mfcr2-1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2-1.4/channels/chan_zap.c?view=diff&rev=147455&r1=147454&r2=147455
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_zap.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_zap.c Tue Oct  7 22:59:00 2008
@@ -893,6 +893,7 @@
 
 static void init_mfcr2_globals(void)
 {
+	int r;
 	mfcr2_cur_context_index = 0;
 	mfcr2_cur_variant = OR2_VAR_UNKNOWN;
 	mfcr2_cur_mfback_timeout = -1;
@@ -911,7 +912,6 @@
 	memset(mfcr2_cur_logdir, 0, sizeof(mfcr2_cur_logdir));
 	memset(mfcr2_cur_r2proto_file, 0, sizeof(mfcr2_cur_r2proto_file));
 	memset(r2links, 0, sizeof(r2links));
-	int r;
 	for (r = 0; r < NUM_SPANS; r++) {
 		r2links[r].master = AST_PTHREADT_NULL;
 	}
@@ -1096,7 +1096,7 @@
 	/*ast_log(LOG_DEBUG, "Read data from zap channel %d\n", openr2_chan_get_number(r2chan));*/
 }
 
-static int zt_r2_cause_to_ast_cause(openr2_call_disconnect_cause_t cause)
+/*static int zt_r2_cause_to_ast_cause(openr2_call_disconnect_cause_t cause)
 {
 	switch (cause) {
 	case OR2_CAUSE_BUSY_NUMBER:
@@ -1115,7 +1115,7 @@
 	default:
 		return AST_CAUSE_NOTDEFINED;
 	}	
-}
+}*/
 
 static void zt_r2_on_call_disconnect(openr2_chan_t *r2chan, openr2_call_disconnect_cause_t cause)
 {
@@ -10904,10 +10904,12 @@
 static int setup_zap(int reload);
 static int zap_restart(void)
 {
+#ifdef HAVE_OPENR2
+	int r;
+#endif
 	if (option_verbose > 0)
 		ast_verbose(VERBOSE_PREFIX_1 "Destroying channels and reloading zaptel configuration.\n");
 #ifdef HAVE_OPENR2
-	int r;
 	for (r = 0; r < NUM_SPANS; r++) {
 		if (r2links[r].master != AST_PTHREADT_NULL) {
 			ast_log(LOG_DEBUG, "Killing MFC/R2 monitor thread %p\n", &r2links[r].master);
@@ -11501,7 +11503,9 @@
 {
 	int x;
 	struct zt_pvt *p, *pl;
-
+#ifdef HAVE_OPENR2
+	int r;
+#endif
 #ifdef HAVE_PRI
 	int i;
 	for (i = 0; i < NUM_SPANS; i++) {
@@ -11511,8 +11515,7 @@
 	ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry));
 	ast_unregister_application(zap_send_keypad_facility_app);
 #endif
-#if defined(HAVE_OPENR2)
-	int r;
+#ifdef HAVE_OPENR2
 	for (r = 0; r < NUM_SPANS; r++) {
 		if (r2links[r].master != AST_PTHREADT_NULL) {
 			pthread_cancel(r2links[r].master);




More information about the svn-commits mailing list