You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pi...@apache.org on 2007/12/18 06:15:33 UTC
svn commit: r605090 - /webservices/axis2/trunk/c/util/src/log.c
Author: pini
Date: Mon Dec 17 21:15:33 2007
New Revision: 605090
URL: http://svn.apache.org/viewvc?rev=605090&view=rev
Log:
Fixed seg fault when log file size is not provided
Modified:
webservices/axis2/trunk/c/util/src/log.c
Modified: webservices/axis2/trunk/c/util/src/log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/log.c?rev=605090&r1=605089&r2=605090&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/log.c (original)
+++ webservices/axis2/trunk/c/util/src/log.c Mon Dec 17 21:15:33 2007
@@ -288,14 +288,17 @@
axutil_log_impl_rotate(log);
fd = log_impl->stream;
-
- if (file)
- fprintf(fd, "[%s] %s%s(%d) %s\n", axutil_log_impl_get_time_str(),
- level_str, file, line, value);
- else
- fprintf(fd, "[%s] %s %s\n", axutil_log_impl_get_time_str(), level_str,
- value);
- fflush(fd);
+
+ if (fd)
+ {
+ if (file)
+ fprintf(fd, "[%s] %s%s(%d) %s\n", axutil_log_impl_get_time_str(),
+ level_str, file, line, value);
+ else
+ fprintf(fd, "[%s] %s %s\n", axutil_log_impl_get_time_str(), level_str,
+ value);
+ fflush(fd);
+ }
axutil_thread_mutex_unlock(mutex);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org