aboutsummaryrefslogtreecommitdiff
path: root/src/util/mst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mst.c')
-rw-r--r--src/util/mst.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util/mst.c b/src/util/mst.c
index 82a21b880..0d90c5d10 100644
--- a/src/util/mst.c
+++ b/src/util/mst.c
@@ -34,7 +34,7 @@
34#define ALIGN_FACTOR 8 34#define ALIGN_FACTOR 8
35#endif 35#endif
36 36
37#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 37#define LOG(kind,...) GNUNET_log_from (kind, "util-mst", __VA_ARGS__)
38 38
39 39
40/** 40/**
@@ -90,8 +90,8 @@ GNUNET_MST_create (GNUNET_MessageTokenizerCallback cb,
90 struct GNUNET_MessageStreamTokenizer *ret; 90 struct GNUNET_MessageStreamTokenizer *ret;
91 91
92 ret = GNUNET_new (struct GNUNET_MessageStreamTokenizer); 92 ret = GNUNET_new (struct GNUNET_MessageStreamTokenizer);
93 ret->hdr = GNUNET_malloc (GNUNET_SERVER_MIN_BUFFER_SIZE); 93 ret->hdr = GNUNET_malloc (GNUNET_MIN_MESSAGE_SIZE);
94 ret->curr_buf = GNUNET_SERVER_MIN_BUFFER_SIZE; 94 ret->curr_buf = GNUNET_MIN_MESSAGE_SIZE;
95 ret->cb = cb; 95 ret->cb = cb;
96 ret->cb_cls = cb_cls; 96 ret->cb_cls = cb_cls;
97 return ret; 97 return ret;
@@ -130,7 +130,7 @@ GNUNET_MST_from_buffer (struct GNUNET_MessageStreamTokenizer *mst,
130 GNUNET_assert (mst->off <= mst->pos); 130 GNUNET_assert (mst->off <= mst->pos);
131 GNUNET_assert (mst->pos <= mst->curr_buf); 131 GNUNET_assert (mst->pos <= mst->curr_buf);
132 LOG (GNUNET_ERROR_TYPE_DEBUG, 132 LOG (GNUNET_ERROR_TYPE_DEBUG,
133 "Server-mst receives %u bytes with %u bytes already in private buffer\n", 133 "MST receives %u bytes with %u bytes already in private buffer\n",
134 (unsigned int) size, 134 (unsigned int) size,
135 (unsigned int) (mst->pos - mst->off)); 135 (unsigned int) (mst->pos - mst->off));
136 ret = GNUNET_OK; 136 ret = GNUNET_OK;
@@ -151,7 +151,7 @@ do_align:
151 } 151 }
152 if (mst->pos - mst->off < sizeof (struct GNUNET_MessageHeader)) 152 if (mst->pos - mst->off < sizeof (struct GNUNET_MessageHeader))
153 { 153 {
154 delta 154 delta
155 = GNUNET_MIN (sizeof (struct GNUNET_MessageHeader) 155 = GNUNET_MIN (sizeof (struct GNUNET_MessageHeader)
156 - (mst->pos - mst->off), 156 - (mst->pos - mst->off),
157 size); 157 size);
@@ -229,8 +229,8 @@ do_align:
229 if (one_shot == GNUNET_YES) 229 if (one_shot == GNUNET_YES)
230 one_shot = GNUNET_SYSERR; 230 one_shot = GNUNET_SYSERR;
231 mst->off += want; 231 mst->off += want;
232 if (GNUNET_SYSERR == mst->cb (mst->cb_cls, 232 if (GNUNET_SYSERR == mst->cb (mst->cb_cls,
233 hdr)) 233 hdr))
234 return GNUNET_SYSERR; 234 return GNUNET_SYSERR;
235 if (mst->off == mst->pos) 235 if (mst->off == mst->pos)
236 { 236 {