[Asterisk-cvs] asterisk logger.c,1.50,1.51

markster at lists.digium.com markster at lists.digium.com
Wed Nov 17 14:27:19 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24221

Modified Files:
	logger.c 
Log Message:
Fix little logging issue


Index: logger.c
===================================================================
RCS file: /usr/cvsroot/asterisk/logger.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- logger.c	16 Nov 2004 13:52:35 -0000	1.50
+++ logger.c	17 Nov 2004 19:27:47 -0000	1.51
@@ -615,6 +615,7 @@
 	vsnprintf(stuff + pos, sizeof(stuff) - pos, fmt, ap);
 	opos = pos;
 	pos = strlen(stuff);
+
 	if (stuff[strlen(stuff)-1] == '\n') 
 		complete = 1;
 	else
@@ -656,11 +657,12 @@
 		fprintf(stdout, stuff + opos); */
 
 	ast_log(LOG_VERBOSE, stuff);
-
-	if (fmt[strlen(fmt)-1] != '\n') 
-		replacelast = 1;
-	else 
-		replacelast = pos = 0;
+	if (strlen(stuff)) {
+		if (stuff[strlen(stuff)-1] != '\n') 
+			replacelast = 1;
+		else 
+			replacelast = pos = 0;
+	}
 	va_end(ap);
 
 	ast_mutex_unlock(&msglist_lock);




More information about the svn-commits mailing list