[asterisk-commits] pabelanger: trunk r306258 - in /trunk: addons/ apps/ cel/ channels/ codecs/ i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 4 10:55:48 CST 2011


Author: pabelanger
Date: Fri Feb  4 10:55:39 2011
New Revision: 306258

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306258
Log:
Replace ast_log(LOG_DEBUG, ...) with ast_debug()

(closes issue #18556)
Reported by: kkm

Review: https://reviewboard.asterisk.org/r/1071/

Modified:
    trunk/addons/chan_ooh323.c
    trunk/apps/app_fax.c
    trunk/apps/app_meetme.c
    trunk/apps/app_rpt.c
    trunk/apps/app_voicemail.c
    trunk/cel/cel_radius.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_gtalk.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/sig_pri.c
    trunk/codecs/codec_ilbc.c
    trunk/include/asterisk/channel.h
    trunk/include/asterisk/sched.h
    trunk/main/app.c
    trunk/main/audiohook.c
    trunk/main/channel.c
    trunk/main/features.c
    trunk/main/http.c
    trunk/main/logger.c
    trunk/main/manager.c
    trunk/main/pbx.c
    trunk/main/say.c
    trunk/main/taskprocessor.c
    trunk/main/xmldoc.c
    trunk/pbx/pbx_loopback.c
    trunk/pbx/pbx_spool.c
    trunk/res/ais/evt.c
    trunk/res/res_agi.c
    trunk/res/res_config_ldap.c
    trunk/res/res_http_post.c
    trunk/res/res_jabber.c
    trunk/res/res_musiconhold.c
    trunk/res/res_odbc.c
    trunk/res/res_rtp_asterisk.c
    trunk/res/res_smdi.c
    trunk/utils/extconf.c

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=306258&r1=306257&r2=306258
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Fri Feb  4 10:55:39 2011
@@ -1037,13 +1037,13 @@
 
 		if (gH323Debug)
 			ast_verbose("    hanging %s with cause: %d\n", p->username, q931cause);
-		ast->tech_pvt = NULL; 
+		ast->tech_pvt = NULL;
 		if (!ast_test_flag(p, H323_ALREADYGONE)) {
-         		ooHangCall(p->callToken, 
+			ooHangCall(p->callToken,
 				ooh323_convert_hangupcause_asteriskToH323(q931cause), q931cause);
 			ast_set_flag(p, H323_ALREADYGONE);
 			/* ast_mutex_unlock(&p->lock); */
-      		} else 
+		} else
 			ast_set_flag(p, H323_NEEDDESTROY);
 		/* detach channel here */
 		if (p->owner) {
@@ -1059,11 +1059,11 @@
 
 		/* Notify the module monitors that use count for resource has changed */
 		ast_update_use_count();
-	  
+
 	} else {
 		ast_debug(1, "No call to hangup\n" );
 	}
-	
+
 	if (gH323Debug)
 		ast_verbose("+++   ooh323_hangup\n");
 
@@ -1083,8 +1083,7 @@
 		if (ast->_state != AST_STATE_UP) {
 			ast_channel_lock(ast);
 			ast_setstate(ast, AST_STATE_UP);
-      			if (option_debug)
-				ast_debug(1, "ooh323_answer(%s)\n", ast->name);
+			ast_debug(1, "ooh323_answer(%s)\n", ast->name);
 			ast_channel_unlock(ast);
 			ooAnswerCall(p->callToken);
 		}
@@ -1133,11 +1132,10 @@
 			return res;
 		}
 
-	
 		if (f->frametype == AST_FRAME_VOICE) {
 /* sending progress for first */
 			if (!ast_test_flag(p, H323_OUTGOING) && !p->progsent &&
-			 		p->callToken) {
+					p->callToken) {
 				ooManualProgress(p->callToken);
 				p->progsent = 1;
 			}
@@ -1201,48 +1199,50 @@
 
 	if (gH323Debug)
 		ast_verbose("----- ooh323_indicate %d on call %s\n", condition, callToken);
-	 
-   	ast_mutex_lock(&p->lock);
+
+	ast_mutex_lock(&p->lock);
 	switch (condition) {
 	case AST_CONTROL_CONGESTION:
 		if (!ast_test_flag(p, H323_ALREADYGONE)) {
-            		ooHangCall(callToken, OO_REASON_LOCAL_CONGESTED, 
+			ooHangCall(callToken, OO_REASON_LOCAL_CONGESTED,
 						AST_CAUSE_SWITCH_CONGESTION);
 			ast_set_flag(p, H323_ALREADYGONE);
 		}
 		break;
 	case AST_CONTROL_BUSY:
 		if (!ast_test_flag(p, H323_ALREADYGONE)) {
-            		ooHangCall(callToken, OO_REASON_LOCAL_BUSY, AST_CAUSE_USER_BUSY);
+			ooHangCall(callToken, OO_REASON_LOCAL_BUSY, AST_CAUSE_USER_BUSY);
 			ast_set_flag(p, H323_ALREADYGONE);
 		}
 		break;
 	case AST_CONTROL_HOLD:
-		ast_moh_start(ast, data, NULL);		
+		ast_moh_start(ast, data, NULL);
 		break;
 	case AST_CONTROL_UNHOLD:
 		ast_moh_stop(ast);
 		break;
 	case AST_CONTROL_PROGRESS:
 		if (ast->_state != AST_STATE_UP) {
-	    		if (!p->progsent) {
-	     			if (gH323Debug) 
-					ast_log(LOG_DEBUG,"Sending manual progress for %s, res = %d\n", callToken,
-             				ooManualProgress(callToken));	
-				else
-	     				ooManualProgress(callToken);
-	     			p->progsent = 1;
-	    		}
+			if (!p->progsent) {
+				if (gH323Debug) {
+					ast_debug(1, "Sending manual progress for %s, res = %d\n", callToken,
+					ooManualProgress(callToken));
+				} else {
+					ooManualProgress(callToken);
+				}
+				p->progsent = 1;
+			}
 		}
 	    break;
       case AST_CONTROL_RINGING:
 	    if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) {
-	    	if (gH323Debug) 
-			ast_log(LOG_DEBUG,"Sending manual ringback for %s, res = %d\n", 
+		if (gH323Debug) {
+			ast_debug(1, "Sending manual ringback for %s, res = %d\n",
 			callToken,
-            		ooManualRingback(callToken));
-		 else
-	    		ooManualRingback(callToken);
+			ooManualRingback(callToken));
+		} else {
+			ooManualRingback(callToken);
+		}
 	    }
 	 break;
 	case AST_CONTROL_SRCUPDATE:
@@ -1256,9 +1256,10 @@
 			|| ast_strlen_zero(ast->connected.id.name.str)) {
 			break;
 		}
-		if (gH323Debug)
-			ast_log(LOG_DEBUG, "Sending connected line info for %s (%s)\n",
+		if (gH323Debug) {
+			ast_debug(1, "Sending connected line info for %s (%s)\n",
 				callToken, ast->connected.id.name.str);
+		}
 		ooSetANI(callToken, ast->connected.id.name.str);
 		break;
 
@@ -1373,8 +1374,8 @@
 
 	if (gH323Debug)
 		ast_verbose("+++++ ooh323_queryoption %d on channel %s\n", option, ast->name);
-	 
-   	ast_mutex_unlock(&p->lock);
+
+	ast_mutex_unlock(&p->lock);
 
 	return res;
 }
@@ -1418,9 +1419,9 @@
 	char formats[FORMAT_STRING_SIZE];
 
 	if (gH323Debug)
-		ast_verbose("---   ooh323_update_writeformat %s/%d\n", 
+		ast_verbose("---   ooh323_update_writeformat %s/%d\n",
 				ast_getformatname(fmt), txframes);
-	
+
 	p = find_call(call);
 	if (!p) {
 		ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1433,7 +1434,7 @@
 
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -1442,7 +1443,7 @@
 			return;
 		}
 		if (gH323Debug)
-	  		ast_verbose("Writeformat before update %s/%s\n", 
+			ast_verbose("Writeformat before update %s/%s\n",
 			  ast_getformatname(&p->owner->writeformat),
 			  ast_getformatname_multiple(formats, sizeof(formats), p->owner->nativeformats));
 		if (txframes)
@@ -1478,7 +1479,7 @@
 	if (gH323Debug)
 		ast_verbose("---   ooh323_update_readformat %s\n", 
 				ast_getformatname(fmt));
-	
+
 	p = find_call(call);
 	if (!p) {
 		ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1491,7 +1492,7 @@
 
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -1501,12 +1502,12 @@
 		}
 
 		if (gH323Debug)
-	  		ast_verbose("Readformat before update %s\n", 
+			ast_verbose("Readformat before update %s\n",
 				  ast_getformatname(&p->owner->readformat));
 		ast_format_cap_set(p->owner->nativeformats, fmt);
-	  	ast_set_read_format(p->owner, &p->owner->readformat);
+		ast_set_read_format(p->owner, &p->owner->readformat);
 		ast_channel_unlock(p->owner);
-   	} else
+	} else
 		ast_log(LOG_ERROR, "No owner found\n");
 
 	ast_mutex_unlock(&p->lock);
@@ -1524,12 +1525,12 @@
 	if (gH323Debug)
 		ast_verbose("--- onAlerting %s\n", call->callToken);
 
-   	p = find_call(call);
-
-   	if(!p) {
+	p = find_call(call);
+
+	if(!p) {
 		ast_log(LOG_ERROR, "No matching call found\n");
 		return -1;
-	}  
+	}
 	ast_mutex_lock(&p->lock);
 	if (!p->owner) {
 		ast_mutex_unlock(&p->lock);
@@ -1537,7 +1538,7 @@
 		return 0;
 	}
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -1580,12 +1581,12 @@
 	if (gH323Debug)
 		ast_verbose("--- onProgress %s\n", call->callToken);
 
-   	p = find_call(call);
-
-   	if(!p) {
+	p = find_call(call);
+
+	if(!p) {
 		ast_log(LOG_ERROR, "No matching call found\n");
 		return -1;
-	}  
+	}
 	ast_mutex_lock(&p->lock);
 	if (!p->owner) {
 		ast_mutex_unlock(&p->lock);
@@ -1593,7 +1594,7 @@
 		return 0;
 	}
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -1619,8 +1620,8 @@
 		ast_setstate(c, AST_STATE_RINGING);
 
 	ast_queue_control(c, AST_CONTROL_PROGRESS);
-      	ast_channel_unlock(c);
-      	ast_mutex_unlock(&p->lock);
+	ast_channel_unlock(c);
+	ast_mutex_unlock(&p->lock);
 
 	if (gH323Debug)
 		ast_verbose("+++ onProgress %s\n", call->callToken);
@@ -1660,7 +1661,7 @@
 	f.src = "SEND_DIGIT";
 
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -1998,16 +1999,16 @@
 		return -1;
 	}
 
-   	if(ast_test_flag(p, H323_OUTGOING)) {
+	if(ast_test_flag(p, H323_OUTGOING)) {
 		ast_mutex_lock(&p->lock);
 		if (!p->owner) {
 			ast_mutex_unlock(&p->lock);
 			ast_log(LOG_ERROR, "Channel has no owner\n");
 			return -1;
 		}
-	
+
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (p->owner) {
@@ -2027,7 +2028,7 @@
 			}
 
 			ast_queue_control(c, AST_CONTROL_ANSWER);
-   			ast_channel_unlock(p->owner);
+			ast_channel_unlock(p->owner);
 			manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
 				"CallRef: %d\r\n", c->name, "OOH323", p->call_reference);
 		}
@@ -2052,42 +2053,42 @@
 
    if ((p = find_call(call))) {
 	ast_mutex_lock(&p->lock);
-  
+
 	while (p->owner) {
 		if (ast_channel_trylock(p->owner)) {
 			ooTrace(OOTRCLVLINFO, "Failed to grab lock, trying again\n");
-         		ast_log(LOG_DEBUG,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		} else {
-         		ownerLock = 1; break;
+			ownerLock = 1; break;
 		}
 	}
 
 	if (ownerLock) {
-		if (!ast_test_flag(p, H323_ALREADYGONE)) { 
+		if (!ast_test_flag(p, H323_ALREADYGONE)) {
 
 			ast_set_flag(p, H323_ALREADYGONE);
 			p->owner->hangupcause = call->q931cause;
 			p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
 			ast_queue_hangup_with_cause(p->owner,call->q931cause);
 		}
-   	}
-
-   	if(p->owner) {
-    		p->owner->tech_pvt = NULL;
+	}
+
+	if(p->owner) {
+		p->owner->tech_pvt = NULL;
 		ast_channel_unlock(p->owner);
-    		p->owner = NULL;
+		p->owner = NULL;
 		ast_module_unref(myself);
 	}
 
 	ast_set_flag(p, H323_NEEDDESTROY);
 
-   	ooh323c_stop_call_thread(call);
+	ooh323c_stop_call_thread(call);
 
 	ast_mutex_unlock(&p->lock);
-   	ast_mutex_lock(&usecnt_lock);
-   	usecnt--;
-   	ast_mutex_unlock(&usecnt_lock);
+	ast_mutex_lock(&usecnt_lock);
+	usecnt--;
+	ast_mutex_unlock(&usecnt_lock);
 
     }
 
@@ -3526,7 +3527,7 @@
 			free(cur->callerid_name);
 			cur->callerid_name = 0;
 		}
-		
+
 		if (cur->callerid_num) {
 			free(cur->callerid_num);
 			cur->callerid_num = 0;
@@ -3541,20 +3542,20 @@
 			ast_udptl_destroy(cur->udptl);
 			cur->udptl = NULL;
 		}
-	
+
 		/* Unlink us from the owner if we have one */
 		if (cur->owner) {
-         		while(ast_channel_trylock(cur->owner)) {
-            			ast_debug(1,"Failed to grab lock, trying again\n");
+			while(ast_channel_trylock(cur->owner)) {
+				ast_debug(1, "Failed to grab lock, trying again\n");
 				DEADLOCK_AVOIDANCE(&cur->lock);
-         		}           
+			}
 			ast_debug(1, "Detaching from %s\n", cur->owner->name);
 			cur->owner->tech_pvt = NULL;
 			ast_channel_unlock(cur->owner);
 			cur->owner = NULL;
 			ast_module_unref(myself);
 		}
-  
+
 		if (cur->vad) {
 			ast_dsp_free(cur->vad);
 			cur->vad = NULL;
@@ -4105,7 +4106,7 @@
 		ast_verbose("---   setup_udptl_connection\n");
 
 	/* Find the call or allocate a private structure if call not found */
-	p = find_call(call); 
+	p = find_call(call);
 
 	if (!p) {
 		ast_log(LOG_ERROR, "Something is wrong: rtp\n");
@@ -4115,7 +4116,7 @@
 	ast_mutex_lock(&p->lock);
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -4142,7 +4143,7 @@
 		ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &parameters, sizeof(parameters));
 	}
 	if (gH323Debug)
-		ast_debug(1, "Receiving UDPTL  %s:%d\n", ast_inet_ntoa(them.sin_addr), 
+		ast_debug(1, "Receiving UDPTL  %s:%d\n", ast_inet_ntoa(them.sin_addr),
 							 ntohs(them.sin_port));
 
 	ast_channel_unlock(p->owner);
@@ -4158,19 +4159,19 @@
 {
 	struct ooh323_pvt *p = NULL;
 
-   	if(gH323Debug)
+	if(gH323Debug)
 		ast_verbose("---   close_udptl_connection\n");
 
 	p = find_call(call);
 	if (!p) {
-      		ast_log(LOG_ERROR, "Couldn't find matching call to close udptl "
+		ast_log(LOG_ERROR, "Couldn't find matching call to close udptl "
                          "connection\n");
 		return;
 	}
 	ast_mutex_lock(&p->lock);
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -4251,8 +4252,10 @@
 		break;
 	case 5:
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
-		if (gH323Debug) ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
+		if (gH323Debug) {
+			ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast->name);
+		}
 		break;
 
 	default:
@@ -4263,7 +4266,7 @@
 		/* We already hold the channel lock */
 		if (f->frametype == AST_FRAME_VOICE && !p->faxmode) {
 			if (!(ast_format_cap_iscompatible(p->owner->nativeformats, &f->subclass.format))) {
-            			ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));
+				ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));
 				ast_format_cap_set(p->owner->nativeformats, &f->subclass.format);
 				ast_set_read_format(p->owner, &p->owner->readformat);
 				ast_set_write_format(p->owner, &p->owner->writeformat);
@@ -4273,8 +4276,9 @@
 				(f->subclass.format.id == AST_FORMAT_SLINEAR || f->subclass.format.id == AST_FORMAT_ALAW ||
 					f->subclass.format.id == AST_FORMAT_ULAW)) {
 				f = ast_dsp_process(p->owner, p->vad, f);
-            			if (f && (f->frametype == AST_FRAME_DTMF)) 
-               				ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.integer);
+				if (f && (f->frametype == AST_FRAME_DTMF)) {
+					ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.integer);
+				}
 			}
 		}
 	}
@@ -4292,13 +4296,15 @@
 
 	ast_mutex_lock(&p->lock);
 
-	if (gH323Debug)
-       		ast_debug(1, "change mode to %d for %s\n", t38mode, call->callToken);
+	if (gH323Debug) {
+		ast_debug(1, "change mode to %d for %s\n", t38mode, call->callToken);
+	}
 
 	if (t38mode == p->faxmode) {
-		if (gH323Debug)
+		if (gH323Debug) {
 			ast_debug(1, "mode for %s is already %d\n", call->callToken,
 					t38mode);
+		}
 		ast_mutex_unlock(&p->lock);
 		return;
 	}

Modified: trunk/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_fax.c?view=diff&rev=306258&r1=306257&r2=306258
==============================================================================
--- trunk/apps/app_fax.c (original)
+++ trunk/apps/app_fax.c Fri Feb  4 10:55:39 2011
@@ -17,7 +17,7 @@
 	<depend>spandsp</depend>
 	<conflict>res_fax</conflict>
 ***/
- 
+
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -172,7 +172,7 @@
 	} else if (level == SPAN_LOG_WARNING) {
 		ast_log(LOG_WARNING, "%s", msg);
 	} else {
-		ast_log(LOG_DEBUG, "%s", msg);
+		ast_debug(1, "%s", msg);
 	}
 }
 
@@ -224,13 +224,13 @@
 
 		return;
 	}
-	
-	s->finished = 1; 
-	
+
+	s->finished = 1;
+
 	local_ident = S_OR(t30_get_tx_ident(f), "");
 	far_ident = S_OR(t30_get_rx_ident(f), "");
-	pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "SUCCESS"); 
-	pbx_builtin_setvar_helper(s->chan, "FAXERROR", NULL); 
+	pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "SUCCESS");
+	pbx_builtin_setvar_helper(s->chan, "FAXERROR", NULL);
 	pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", far_ident);
 #if SPANDSP_RELEASE_DATE >= 20090220
 	pages_transferred = (s->direction) ? stat.pages_tx : stat.pages_rx;
@@ -242,14 +242,14 @@
 	snprintf(buf, sizeof(buf), "%d", stat.y_resolution);
 	pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", buf);
 	snprintf(buf, sizeof(buf), "%d", stat.bit_rate);
-	pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", buf); 
-	
+	pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", buf);
+
 	ast_debug(1, "Fax transmitted successfully.\n");
 	ast_debug(1, "  Remote station ID: %s\n", far_ident);
 	ast_debug(1, "  Pages transferred: %d\n", pages_transferred);
 	ast_debug(1, "  Image resolution:  %d x %d\n", stat.x_resolution, stat.y_resolution);
 	ast_debug(1, "  Transfer Rate:     %d\n", stat.bit_rate);
-	
+
 	ast_manager_event(s->chan, EVENT_FLAG_CALL,
 		s->direction ? "FaxSent" : "FaxReceived",
 		"Channel: %s\r\n"
@@ -400,7 +400,7 @@
 			/* wait up to five seconds for negotiation to complete */
 			unsigned int timeout = 5000;
 			int ms;
-			
+
 			ast_debug(1, "Negotiating T.38 for receive on %s\n", s->chan->name);
 			while (timeout > 0) {
 				ms = ast_waitfor(s->chan, 1000);
@@ -425,7 +425,7 @@
 				    (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) &&
 				    (inf->datalen == sizeof(t38_parameters))) {
 					struct ast_control_t38_parameters *parameters = inf->data.ptr;
-					
+
 					switch (parameters->request_response) {
 					case AST_T38_NEGOTIATED:
 						ast_debug(1, "Negotiated T.38 for receive on %s\n", s->chan->name);
@@ -670,7 +670,7 @@
 			res = -1;
 			break;
 		}
-		
+
 		t38_terminal_send_timeout(&t38, ast_tvdiff_us(now, last_frame) / (1000000 / 8000));
 
 		if (!res) {
@@ -727,7 +727,7 @@
 			/* wait up to five seconds for negotiation to complete */
 			unsigned int timeout = 5000;
 			int ms;
-			
+
 			ast_debug(1, "Shutting down T.38 on %s\n", s->chan->name);
 			while (timeout > 0) {
 				ms = ast_waitfor(s->chan, 1000);
@@ -752,7 +752,7 @@
 				    (inf->subclass.integer == AST_CONTROL_T38_PARAMETERS) &&
 				    (inf->datalen == sizeof(t38_parameters))) {
 					struct ast_control_t38_parameters *parameters = inf->data.ptr;
-					
+
 					switch (parameters->request_response) {
 					case AST_T38_TERMINATED:
 						ast_debug(1, "Shut down T.38 on %s\n", s->chan->name);

Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=306258&r1=306257&r2=306258
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Fri Feb  4 10:55:39 2011
@@ -2051,7 +2051,7 @@
 
 static void conf_start_moh(struct ast_channel *chan, const char *musicclass)
 {
-  	char *original_moh;
+	char *original_moh;
 
 	ast_channel_lock(chan);
 	original_moh = ast_strdupa(chan->musicclass);
@@ -2106,7 +2106,7 @@
 		}
 
 		for (res = 1; !conf->announcethread_stop && (current = AST_LIST_REMOVE_HEAD(&local_list, entry)); ao2_ref(current, -1)) {
-			ast_log(LOG_DEBUG, "About to play %s\n", current->namerecloc);
+			ast_debug(1, "About to play %s\n", current->namerecloc);
 			if (!ast_fileexists(current->namerecloc, NULL, NULL))
 				continue;
 			if ((current->confchan) && (current->confusers > 1) && !ast_check_hangup(current->confchan)) {
@@ -2251,16 +2251,16 @@
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 	char *exitkeys = NULL;
- 	unsigned int calldurationlimit = 0;
- 	long timelimit = 0;
- 	long play_warning = 0;
- 	long warning_freq = 0;
- 	const char *warning_sound = NULL;
- 	const char *end_sound = NULL;
- 	char *parse;	
- 	long time_left_ms = 0;
- 	struct timeval nexteventts = { 0, };
- 	int to;
+	unsigned int calldurationlimit = 0;
+	long timelimit = 0;
+	long play_warning = 0;
+	long warning_freq = 0;
+	const char *warning_sound = NULL;
+	const char *end_sound = NULL;
+	char *parse;
+	long time_left_ms = 0;
+	struct timeval nexteventts = { 0, };
+	int to;
 	int setusercount = 0;
 	int confsilence = 0, totalsilence = 0;
 	char *mailbox, *context;
@@ -2283,72 +2283,72 @@
 		(opt_waitmarked_timeout > 0)) {
 		timeout = time(NULL) + opt_waitmarked_timeout;
 	}
-	 	
- 	if (ast_test_flag64(confflags, CONFFLAG_DURATION_STOP) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_STOP])) {
- 		calldurationlimit = atoi(optargs[OPT_ARG_DURATION_STOP]);
- 		ast_verb(3, "Setting call duration limit to %d seconds.\n", calldurationlimit);
- 	}
- 	
- 	if (ast_test_flag64(confflags, CONFFLAG_DURATION_LIMIT) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_LIMIT])) {
- 		char *limit_str, *warning_str, *warnfreq_str;
+
+	if (ast_test_flag64(confflags, CONFFLAG_DURATION_STOP) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_STOP])) {
+		calldurationlimit = atoi(optargs[OPT_ARG_DURATION_STOP]);
+		ast_verb(3, "Setting call duration limit to %d seconds.\n", calldurationlimit);
+	}
+
+	if (ast_test_flag64(confflags, CONFFLAG_DURATION_LIMIT) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_LIMIT])) {
+		char *limit_str, *warning_str, *warnfreq_str;
 		const char *var;
- 
- 		parse = optargs[OPT_ARG_DURATION_LIMIT];
- 		limit_str = strsep(&parse, ":");
- 		warning_str = strsep(&parse, ":");
- 		warnfreq_str = parse;
- 
- 		timelimit = atol(limit_str);
- 		if (warning_str)
- 			play_warning = atol(warning_str);
- 		if (warnfreq_str)
- 			warning_freq = atol(warnfreq_str);
- 
- 		if (!timelimit) {
- 			timelimit = play_warning = warning_freq = 0;
- 			warning_sound = NULL;
- 		} else if (play_warning > timelimit) {			
- 			if (!warning_freq) {
- 				play_warning = 0;
- 			} else {
- 				while (play_warning > timelimit)
- 					play_warning -= warning_freq;
- 				if (play_warning < 1)
- 					play_warning = warning_freq = 0;
- 			}
- 		}
- 		
+
+		parse = optargs[OPT_ARG_DURATION_LIMIT];
+		limit_str = strsep(&parse, ":");
+		warning_str = strsep(&parse, ":");
+		warnfreq_str = parse;
+
+		timelimit = atol(limit_str);
+		if (warning_str)
+			play_warning = atol(warning_str);
+		if (warnfreq_str)
+			warning_freq = atol(warnfreq_str);
+
+		if (!timelimit) {
+			timelimit = play_warning = warning_freq = 0;
+			warning_sound = NULL;
+		} else if (play_warning > timelimit) {
+			if (!warning_freq) {
+				play_warning = 0;
+			} else {
+				while (play_warning > timelimit)
+					play_warning -= warning_freq;
+				if (play_warning < 1)
+					play_warning = warning_freq = 0;
+			}
+		}
+
 		ast_channel_lock(chan);
 		if ((var = pbx_builtin_getvar_helper(chan, "CONF_LIMIT_WARNING_FILE"))) {
 			var = ast_strdupa(var);
 		}
 		ast_channel_unlock(chan);
 
- 		warning_sound = var ? var : "timeleft";
- 		
+		warning_sound = var ? var : "timeleft";
+
 		ast_channel_lock(chan);
 		if ((var = pbx_builtin_getvar_helper(chan, "CONF_LIMIT_TIMEOUT_FILE"))) {
 			var = ast_strdupa(var);
 		}
 		ast_channel_unlock(chan);
- 		
+
 		end_sound = var ? var : NULL;
- 			
- 		/* undo effect of S(x) in case they are both used */
- 		calldurationlimit = 0;
- 		/* more efficient do it like S(x) does since no advanced opts */
- 		if (!play_warning && !end_sound && timelimit) { 
- 			calldurationlimit = timelimit / 1000;
- 			timelimit = play_warning = warning_freq = 0;
- 		} else {
- 			ast_debug(2, "Limit Data for this call:\n");
+
+		/* undo effect of S(x) in case they are both used */
+		calldurationlimit = 0;
+		/* more efficient do it like S(x) does since no advanced opts */
+		if (!play_warning && !end_sound && timelimit) {
+			calldurationlimit = timelimit / 1000;
+			timelimit = play_warning = warning_freq = 0;
+		} else {
+			ast_debug(2, "Limit Data for this call:\n");
 			ast_debug(2, "- timelimit     = %ld\n", timelimit);
- 			ast_debug(2, "- play_warning  = %ld\n", play_warning);
- 			ast_debug(2, "- warning_freq  = %ld\n", warning_freq);
- 			ast_debug(2, "- warning_sound = %s\n", warning_sound ? warning_sound : "UNDEF");
- 			ast_debug(2, "- end_sound     = %s\n", end_sound ? end_sound : "UNDEF");
- 		}
- 	}
+			ast_debug(2, "- play_warning  = %ld\n", play_warning);
+			ast_debug(2, "- warning_freq  = %ld\n", warning_freq);
+			ast_debug(2, "- warning_sound = %s\n", warning_sound ? warning_sound : "UNDEF");
+			ast_debug(2, "- end_sound     = %s\n", end_sound ? end_sound : "UNDEF");
+		}
+	}
 
 	/* Get exit keys */
 	if (ast_test_flag64(confflags, CONFFLAG_KEYEXIT)) {
@@ -2667,7 +2667,7 @@
 	memset(&dahdic, 0, sizeof(dahdic));
 	memset(&dahdic_empty, 0, sizeof(dahdic_empty));
 	/* Check to see if we're in a conference... */
-	dahdic.chan = 0;	
+	dahdic.chan = 0;
 	if (ioctl(fd, DAHDI_GETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Error getting conference\n");
 		close(fd);
@@ -2683,7 +2683,7 @@
 	}
 	memset(&dahdic, 0, sizeof(dahdic));
 	/* Add us to the conference */
-	dahdic.chan = 0;	
+	dahdic.chan = 0;
 	dahdic.confno = conf->dahdiconf;
 
 	if (!ast_test_flag64(confflags, CONFFLAG_QUIET) && (ast_test_flag64(confflags, CONFFLAG_INTROUSER) ||
@@ -2717,7 +2717,7 @@
 		dahdic.confmode = DAHDI_CONF_CONFMON | DAHDI_CONF_LISTENER;
 	else if (ast_test_flag64(confflags, CONFFLAG_TALKER))
 		dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER;
-	else 
+	else
 		dahdic.confmode = DAHDI_CONF_CONF | DAHDI_CONF_TALKER | DAHDI_CONF_LISTENER;
 
 	if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
@@ -3595,7 +3595,7 @@
 				} else if ((f->frametype == AST_FRAME_DTMF) && ast_test_flag64(confflags, CONFFLAG_KEYEXIT) &&
 					(strchr(exitkeys, f->subclass.integer))) {
 					pbx_builtin_setvar_helper(chan, "MEETME_EXIT_KEY", dtmfstr);
-						
+
 					if (ast_test_flag64(confflags, CONFFLAG_PASS_DTMF)) {
 						conf_queue_dtmf(conf, user, f);
 					}
@@ -3623,12 +3623,12 @@
 						goto outrun;
 						break;
 					default:
-						ast_debug(1, 
+						ast_debug(1,
 							"Got ignored control frame on channel %s, f->frametype=%d,f->subclass=%d\n",
 							chan->name, f->frametype, f->subclass.integer);
 					}
 				} else {
-					ast_debug(1, 
+					ast_debug(1,
 						"Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n",
 						chan->name, f->frametype, f->subclass.integer);
 				}
@@ -4046,7 +4046,7 @@
 	AST_LIST_LOCK(&confs);
 	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		ast_debug(3, "Does conf %s match %s?\n", confno, cnf->confno);
-		if (!strcmp(confno, cnf->confno)) 
+		if (!strcmp(confno, cnf->confno))
 			break;
 	}
 	if (cnf) {
@@ -6280,7 +6280,7 @@
 	}
 
 	snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_ref->trunk->name);
-	ast_set_flag64(&conf_flags, 
+	ast_set_flag64(&conf_flags,
 		CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
 	ast_answer(chan);
 	conf = build_conf(conf_name, "", "", 0, 0, 1, chan, NULL);

Modified: trunk/apps/app_rpt.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_rpt.c?view=diff&rev=306258&r1=306257&r2=306258
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Fri Feb  4 10:55:39 2011
@@ -1646,7 +1646,7 @@
 				ast_playtones_start(myrpt->txchannel, 0, dtmf_tones[15], 0);
 			else {
 				/* not handled */
-				ast_log(LOG_DEBUG, "Unable to generate DTMF tone '%c' for '%s'\n", digit, myrpt->txchannel->name);
+				ast_debug(1, "Unable to generate DTMF tone '%c' for '%s'\n", digit, myrpt->txchannel->name);
 			}
 			rpt_mutex_lock(&myrpt->lock);
 		}
@@ -12525,7 +12525,7 @@
 							f->data.ptr,f->datalen / 2);
 						if (n1 != l->wasvox)
 						{
-							if (debug)ast_log(LOG_DEBUG,"Link Node %s, vox %d\n",l->name,n1);
+							ast_debug(1,"Link Node %s, vox %d\n",l->name,n1);
 							l->wasvox = n1;
 							l->voxtostate = 0;
 							if (n1) l->voxtotimer = myrpt->p.voxtimeout_ms;
@@ -12874,7 +12874,7 @@
 				n = dovox(&myrpt->vox,f->data.ptr,f->datalen / 2);
 				if (n != myrpt->wasvox)
 				{
-					if (debug) ast_log(LOG_DEBUG,"Node %s, vox %d\n",myrpt->name,n);
+					ast_debug(1,"Node %s, vox %d\n",myrpt->name,n);
 					myrpt->wasvox = n;
 					myrpt->voxtostate = 0;
 					if (n) myrpt->voxtotimer = myrpt->p.voxtimeout_ms;

Modified: trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=306258&r1=306257&r2=306258
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Feb  4 10:55:39 2011
@@ -1212,7 +1212,7 @@
 	if (!ast_strlen_zero(ext_pass_check_cmd)) {
 		char cmd[255], buf[255];
 
-		ast_log(AST_LOG_DEBUG, "Verify password policies for %s\n", password);
+		ast_debug(1, "Verify password policies for %s\n", password);
 
 		snprintf(cmd, sizeof(cmd), "%s %s %s %s %s", ext_pass_check_cmd, vmu->mailbox, vmu->context, vmu->password, password);
 		if (vm_check_password_shell(cmd, buf, sizeof(buf))) {
@@ -1754,8 +1754,7 @@
 		ast_log(LOG_WARNING, "msgnum %d, mailbox message %lu is zero.\n", msgnum, messageNum);
 		return;
 	}
-	if (option_debug > 2)
-		ast_log(LOG_DEBUG, "deleting msgnum %d, which is mailbox message %lu\n", msgnum, messageNum);
+	ast_debug(3, "deleting msgnum %d, which is mailbox message %lu\n", msgnum, messageNum);
 	/* delete message */
 	snprintf (arg, sizeof(arg), "%lu", messageNum);
 	ast_mutex_lock(&vms->lock);
@@ -1782,7 +1781,7 @@
 		if (file)
 			*file++ = '\0';
 		else {
-			ast_debug (1, "Failed to procure file name from directory passed.\n");
+			ast_debug(1, "Failed to procure file name from directory passed.\n");
 			return -1;
 		}
 	}
@@ -1878,7 +1877,7 @@
 		res = -1;
 		goto exit;
 	}
-	
+
 	make_file(vms->fn, sizeof(vms->fn), dir, msgnum);
 	snprintf(vms->introfn, sizeof(vms->introfn), "%sintro", vms->fn);
 
@@ -1888,8 +1887,7 @@
 		goto exit;
 	}
 
-	if (option_debug > 2)
-		ast_log(LOG_DEBUG, "Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n", msgnum, vms->msgArray[msgnum]);
+	ast_debug(3, "Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n", msgnum, vms->msgArray[msgnum]);
 	if (vms->msgArray[msgnum] == 0) {
 		ast_log(LOG_WARNING, "Trying to access unknown message\n");
 		res = -1;
@@ -2029,7 +2027,7 @@
 			return -1;
 		}
 	}
-	
+
 	/* No IMAP account available */
 	if (vmu->imapuser[0] == '\0') {
 		ast_log(AST_LOG_WARNING, "IMAP user not set for mailbox %s\n", vmu->mailbox);
@@ -2126,7 +2124,7 @@
 		ast_play_and_wait(chan, "vm-mailboxfull");
 		return -1;
 	}
-	
+
 	/* Check if we have exceeded maxmsg */
 	ast_debug(3, "Checking message number quota: mailbox has %d messages, maximum is set to %d, current messages %d\n", msgnum, vmu->maxmsg, inprocess_count(vmu->mailbox, vmu->context, 0));
 	if (msgnum >= vmu->maxmsg - inprocess_count(vmu->mailbox, vmu->context, +1)) {
@@ -2178,7 +2176,7 @@
     if (msgnum < 0 && !imapgreetings) {
         return 0;
     }
-	
+
 	if (imap_check_limits(chan, vms, vmu, msgcount)) {
 		return -1;
 	}
@@ -2188,7 +2186,7 @@
 		ast_debug(3, "Setting message flag \\\\FLAGGED.\n");
 		imap_flags = "\\FLAGGED";
 	}
-	
+
 	/* Attach only the first format */
 	fmt = ast_strdupa(fmt);
 	stringp = fmt;
@@ -2206,7 +2204,7 @@
 	if (ast_fileexists(introfn, NULL, NULL) <= 0) {
 		*introfn = '\0';
 	}
-	
+
 	if (ast_strlen_zero(vmu->email)) {
 		/* We need the vmu->email to be set when we call make_email_file, but
 		 * if we keep it set, a duplicate e-mail will be created. So at the end
@@ -2278,7 +2276,7 @@
 		return -1;
 	}
 	ast_debug(3, "%s stored\n", fn);
-	
+
 	if (tempcopy)
 		*(vmu->email) = '\0';
 	inprocess_count(vmu->mailbox, vmu->context, -1);
@@ -2317,7 +2315,7 @@
 	/* If no mailbox, return immediately */
 	if (ast_strlen_zero(mailbox_context))
 		return 0;
-	
+
 	ast_copy_string(tmp, mailbox_context, sizeof(tmp));
 	context = strchr(tmp, '@');
 	if (strchr(mailbox_context, ',')) {
@@ -2499,16 +2497,14 @@
 	MAILSTREAM *stream = NIL;
 	long debug;
 	char tmp[256];
-	
+
 	if (!vms) {
 		ast_log(LOG_ERROR, "vm_state is NULL!\n");
 		return -1;
 	}
-	if (option_debug > 2)
-		ast_log(LOG_DEBUG, "vm_state user is:%s\n", vms->imapuser);
+	ast_debug(3, "vm_state user is:%s\n", vms->imapuser);
 	if (vms->mailstream == NIL || !vms->mailstream) {
-		if (option_debug)
-			ast_log(LOG_DEBUG, "mailstream not set.\n");
+		ast_debug(1, "mailstream not set.\n");
 	} else {
 		stream = vms->mailstream;
 	}
@@ -2541,8 +2537,7 @@
 	}
 	/* Now connect to the target folder */
 	imap_mailbox_name(tmp, sizeof(tmp), vms, box, 1);
-	if (option_debug > 2)
-		ast_log(LOG_DEBUG, "Before mail_open, server: %s, box:%d\n", tmp, box);
+	ast_debug(3, "Before mail_open, server: %s, box:%d\n", tmp, box);
 	ast_mutex_lock(&vms->lock);
 	vms->mailstream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
 	ast_mutex_unlock(&vms->lock);
@@ -2574,9 +2569,9 @@
 		ast_log(AST_LOG_ERROR, "Could not initialize mailstream\n");
 		return -1;
 	}
-	
+
 	create_dirpath(vms->curdir, sizeof(vms->curdir), vmu->context, vms->username, vms->curbox);
-	
+
 	/* Check Quota */
 	if  (box == 0)  {
 		ast_debug(3, "Mailbox name set to: %s, about to check quotas\n", mbox(vmu, box));
@@ -2853,13 +2848,13 @@
 	char *mailbox = stream->mailbox, *user;
 	char buf[1024] = "";
 	unsigned long usage = 0, limit = 0;
-	
+
 	while (pquota) {
 		usage = pquota->usage;
 		limit = pquota->limit;
 		pquota = pquota->next;
 	}
-	
+
 	if (!(user = get_user_by_mailbox(mailbox, buf, sizeof(buf))) || (!(vms = get_vm_state_by_imapuser(user, 2)) && !(vms = get_vm_state_by_imapuser(user, 0)))) {
 		ast_log(AST_LOG_ERROR, "No state found.\n");
 		return;
@@ -2927,8 +2922,7 @@
 	if ((vms_p = pthread_getspecific(ts_vmstate.key)) && !strcmp(vms_p->imapuser, vmu->imapuser) && !strcmp(vms_p->username, vmu->mailbox)) {
 		return vms_p;
 	}
-	if (option_debug > 4)
-		ast_log(AST_LOG_DEBUG, "Adding new vmstate for %s\n", vmu->imapuser);
+	ast_debug(5, "Adding new vmstate for %s\n", vmu->imapuser);
 	if (!(vms_p = ast_calloc(1, sizeof(*vms_p))))
 		return NULL;
 	ast_copy_string(vms_p->imapuser, vmu->imapuser, sizeof(vms_p->imapuser));
@@ -2937,8 +2931,7 @@
 	ast_copy_string(vms_p->context, vmu->context, sizeof(vms_p->context));
 	vms_p->mailstream = NIL; /* save for access from interactive entry point */
 	vms_p->imapversion = vmu->imapversion;
-	if (option_debug > 4)
-		ast_log(AST_LOG_DEBUG, "Copied %s to %s\n", vmu->imapuser, vms_p->imapuser);
+	ast_debug(5, "Copied %s to %s\n", vmu->imapuser, vms_p->imapuser);
 	vms_p->updated = 1;
 	/* set mailbox to INBOX! */
 	ast_copy_string(vms_p->curbox, mbox(vmu, 0), sizeof(vms_p->curbox));
@@ -3012,7 +3005,7 @@
 		}
 
 		ast_debug(3, "comparing mailbox %s@%s (i=%d) to vmstate mailbox %s@%s (i=%d)\n", mailbox, local_context, interactive, vlist->vms->username, vlist->vms->context, vlist->vms->interactive);
-		
+
 		if (!strcmp(vlist->vms->username, mailbox) && !strcmp(vlist->vms->context, local_context) && vlist->vms->interactive == interactive) {
 			ast_debug(3, "Found it!\n");
 			AST_LIST_UNLOCK(&vmstates);
@@ -3026,7 +3019,7 @@
 	return NULL;
 }
 
-static void vmstate_insert(struct vm_state *vms) 
+static void vmstate_insert(struct vm_state *vms)
 {
 	struct vmstate *v;
 	struct vm_state *altvms;
@@ -3036,7 +3029,7 @@
 	   We can compare the username to find the duplicate */
 	if (vms->interactive == 1) {
 		altvms = get_vm_state_by_mailbox(vms->username, vms->context, 0);
-		if (altvms) {	
+		if (altvms) {
 			ast_debug(3, "Duplicate mailbox %s, copying message info...\n", vms->username);
 			vms->newmessages = altvms->newmessages;
 			vms->oldmessages = altvms->oldmessages;
@@ -3057,7 +3050,7 @@
 
 	if (!(v = ast_calloc(1, sizeof(*v))))
 		return;
-	
+
 	v->vms = vms;
 
 	ast_debug(3, "Inserting vm_state for user:%s, mailbox %s\n", vms->imapuser, vms->username);
@@ -3067,7 +3060,7 @@
 	AST_LIST_UNLOCK(&vmstates);
 }
 
-static void vmstate_delete(struct vm_state *vms) 
+static void vmstate_delete(struct vm_state *vms)
 {
 	struct vmstate *vc = NULL;
 	struct vm_state *altvms = NULL;
@@ -3084,9 +3077,9 @@
 		/* Interactive states are not stored within the persistent list */
 		return;
 	}
-	
+
 	ast_debug(3, "Removing vm_state for user:%s, mailbox %s\n", vms->imapuser, vms->username);
-	
+
 	AST_LIST_LOCK(&vmstates);
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&vmstates, vc, list) {
 		if (vc->vms == vms) {
@@ -3105,7 +3098,7 @@
 		ast_log(AST_LOG_ERROR, "No vmstate found for user:%s, mailbox %s\n", vms->imapuser, vms->username);
 }
 
-static void set_update(MAILSTREAM * stream) 
+static void set_update(MAILSTREAM * stream)
 {
 	struct vm_state *vms;
 	char *mailbox = stream->mailbox, *user;
@@ -3122,7 +3115,7 @@
 	vms->updated = 1; /* Set updated flag since mailbox changed */
 }
 
-static void init_vm_state(struct vm_state *vms) 
+static void init_vm_state(struct vm_state *vms)
 {
 	int x;
 	vms->vmArrayIndex = 0;
@@ -3132,7 +3125,7 @@
 	ast_mutex_init(&vms->lock);
 }
 
-static int save_body(BODY *body, struct vm_state *vms, char *section, char *format, int is_intro) 
+static int save_body(BODY *body, struct vm_state *vms, char *section, char *format, int is_intro)
 {
 	char *body_content;
 	char *body_decoded;
@@ -3140,7 +3133,7 @@
 	unsigned long len;
 	unsigned long newlen;
 	char filename[256];
-	
+
 	if (!body || body == NIL)
 		return -1;
 
@@ -3149,9 +3142,9 @@
 	ast_mutex_unlock(&vms->lock);
 	if (body_content != NIL) {
 		snprintf(filename, sizeof(filename), "%s.%s", fn, format);
-		/* ast_debug(1,body_content); */
+		/* ast_debug(1, body_content); */
 		body_decoded = rfc822_base64((unsigned char *) body_content, len, &newlen);
- 		/* If the body of the file is empty, return an error */
+		/* If the body of the file is empty, return an error */
 		if (!newlen) {
 			return -1;
 		}
@@ -4256,9 +4249,7 @@
 		strcat(fromfile, ".txt");
 	}
 	if (!(msg_cfg = ast_config_load(fromfile, config_flags))) {
-		if (option_debug > 0) {
-			ast_log(LOG_DEBUG, "Config load for message text file '%s' failed\n", fromfile);
-		}
+		ast_debug(1, "Config load for message text file '%s' failed\n", fromfile);
 		return;
 	}
 
@@ -4930,7 +4921,7 @@
 {
 	struct ast_tm tm;
 	struct timeval t = ast_tvnow();
-	
+
 	ast_localtime(&t, &tm, "UTC");
 
 	return ast_strftime(s, len, "%a %b %e %r UTC %Y", &tm);
@@ -5669,8 +5660,7 @@
 	}
 	/* If maxmsg is zero, act as a "greetings only" voicemail: Exit successfully without recording */
 	if (vmu->maxmsg == 0) {
-		if (option_debug > 2)
-			ast_log(LOG_DEBUG, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");
+		ast_debug(3, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");
 		pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
 		goto leave_vm_out;
 	}
@@ -5762,7 +5752,7 @@
 			}
 		}
 		vms->newmessages++;
-		
+
 		/* here is a big difference! We add one to it later */
 		msgnum = newmsgs + oldmsgs;
 		ast_debug(3, "Messagecount set to %d\n", msgnum);
@@ -6077,7 +6067,7 @@
 
 	/* get the real IMAP message number for this message */
 	snprintf(sequence, sizeof(sequence), "%ld", vms->msgArray[msg]);
-	
+

[... 3902 lines stripped ...]



More information about the asterisk-commits mailing list