]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Added FWP_ERROR macro for debugging of errors
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Jul 2008 14:50:28 +0000 (16:50 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Jul 2008 14:50:28 +0000 (16:50 +0200)
fwp/lib/core/fwp_util.h

index dc2b2f7b25420c52173ef7300c10c8c2b9b6e963..9f18a69a4cbcd72d795d1a1330ed83ac64985157 100644 (file)
@@ -31,10 +31,12 @@ extern const char *ac_to_text[4];
  * debugging function. */
 
 #ifdef DEBUG
-#define FWP_DEBUG(fmt,args...) printf("%s: " fmt, __func__ , ##args)
+#define FWP_DEBUG(fmt,args...) printf("fwp: %s: " fmt, __func__ , ##args)
+#define FWP_ERROR(fmt,args...) fprintf(stderr, "fwp: %s: " fmt, __func__ , ##args)
 
 #else
 #define FWP_DEBUG(fmt,args...)
+#define FWP_ERROR(fmt,args...)
 #endif
 
 #define _fwp_sendto(s, buf, len, flags, to, tolen)\