Browse code

revert patch for bb#360

git-svn: trunk@2896

Tomasz Kojm authored on 2007/03/02 11:41:29
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Fri Mar  2 01:44:10 CET 2007 (tk)
2
+---------------------------------
3
+  * shared/output.c: revert patch for bb#360 (didn't work properly when
4
+		     mprintf() was called from logg())
5
+
1 6
 Thu Mar  1 22:12:22 CET 2007 (tk)
2 7
 ---------------------------------
3 8
   * clamd/server-th.c: make more attempts when cl_load returns CL_ELOCKDB
... ...
@@ -287,20 +287,20 @@ void mprintf(const char *str, ...)
287 287
     vsnprintf(buff, sizeof(buff), str, args);
288 288
     va_end(args);
289 289
 
290
-    if(*str == '!') {
290
+    if(buff[0] == '!') {
291 291
        if(!mprintf_stdout)
292 292
            fd = stderr;
293 293
 	fprintf(fd, "ERROR: %s", &buff[1]);
294
-    } else if(*str == '@') {
294
+    } else if(buff[0] == '@') {
295 295
        if(!mprintf_stdout)
296 296
            fd = stderr;
297 297
 	fprintf(fd, "ERROR: %s", &buff[1]);
298 298
     } else if(!mprintf_quiet) {
299
-	if(*str == '^') {
299
+	if(buff[0] == '^') {
300 300
            if(!mprintf_stdout)
301 301
                fd = stderr;
302 302
 	    fprintf(fd, "WARNING: %s", &buff[1]);
303
-	} else if(*str == '*') {
303
+	} else if(buff[0] == '*') {
304 304
 	    if(mprintf_verbose)
305 305
 		fprintf(fd, "%s", &buff[1]);
306 306
 	} else fprintf(fd, "%s", buff);