#include "gnunet_server_lib.h"
#include "gnunet_time_lib.h"
-#define DEBUG_SERVER_MST GNUNET_NO
+#define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING
#if HAVE_UNALIGNED_64_ACCESS
#define ALIGN_FACTOR 4
#define ALIGN_FACTOR 8
#endif
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
/**
* Handle to a message stream tokenizer.
int ret;
#if DEBUG_SERVER_MST
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Server-mst receives %u bytes with %u bytes already in private buffer\n",
- (unsigned int) size, (unsigned int) (mst->pos - mst->off));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Server-mst receives %u bytes with %u bytes already in private buffer\n",
+ (unsigned int) size, (unsigned int) (mst->pos - mst->off));
#endif
ret = GNUNET_OK;
ibuf = (char *) mst->hdr;
while (size > 0)
{
#if DEBUG_SERVER_MST
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Server-mst has %u bytes left in inbound buffer\n",
- (unsigned int) size);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Server-mst has %u bytes left in inbound buffer\n",
+ (unsigned int) size);
#endif
if (size < sizeof (struct GNUNET_MessageHeader))
break;
if (purge)
mst->off = 0;
#if DEBUG_SERVER_MST
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Server-mst leaves %u bytes in private buffer\n",
- (unsigned int) (mst->pos - mst->off));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Server-mst leaves %u bytes in private buffer\n",
+ (unsigned int) (mst->pos - mst->off));
#endif
return ret;
}