diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-25 04:06:58 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-25 04:06:58 +0100 |
commit | d1490c7864309e0a9dabab0687bbb4b2ab965b47 (patch) | |
tree | 75e3e1489fc9461c34163412dbccae3af88b4638 /src/gns | |
parent | f27515316a9374e88c689b7e039b3902bd56b5a1 (diff) | |
download | gnunet-d1490c7864309e0a9dabab0687bbb4b2ab965b47.tar.gz gnunet-d1490c7864309e0a9dabab0687bbb4b2ab965b47.zip |
this should be dead
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-gns-helper-service-w32.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c index c0482d931..8a047c9fd 100644 --- a/src/gns/gnunet-gns-helper-service-w32.c +++ b/src/gns/gnunet-gns-helper-service-w32.c | |||
@@ -155,53 +155,6 @@ do_shutdown (void *cls) | |||
155 | 155 | ||
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Function called to notify a client about the socket | ||
159 | * being ready to queue more data. "buf" will be | ||
160 | * NULL and "size" zero if the socket was closed for | ||
161 | * writing in the meantime. | ||
162 | * | ||
163 | * @param cls closure | ||
164 | * @param size number of bytes available in buf | ||
165 | * @param buf where the callee should write the message | ||
166 | * @return number of bytes written to buf | ||
167 | */ | ||
168 | static size_t | ||
169 | transmit_callback (void *cls, size_t size, void *buf) | ||
170 | { | ||
171 | struct TransmitCallbackContext *tcc = cls; | ||
172 | size_t msize; | ||
173 | |||
174 | tcc->th = NULL; | ||
175 | GNUNET_CONTAINER_DLL_remove (tcc_head, tcc_tail, tcc); | ||
176 | msize = ntohs (tcc->msg->size); | ||
177 | if (size == 0) | ||
178 | { | ||
179 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
180 | _("Transmission to client failed!\n")); | ||
181 | GNUNET_free (tcc->msg); | ||
182 | GNUNET_free (tcc); | ||
183 | return 0; | ||
184 | } | ||
185 | GNUNET_assert (size >= msize); | ||
186 | GNUNET_memcpy (buf, tcc->msg, msize); | ||
187 | GNUNET_free (tcc->msg); | ||
188 | GNUNET_free (tcc); | ||
189 | for (tcc = tcc_head; tcc; tcc = tcc->next) | ||
190 | { | ||
191 | if (NULL == tcc->th) | ||
192 | { | ||
193 | tcc->th = GNUNET_SERVER_notify_transmit_ready (tcc->client, | ||
194 | ntohs (tcc->msg->size), | ||
195 | GNUNET_TIME_UNIT_FOREVER_REL, | ||
196 | &transmit_callback, tcc); | ||
197 | break; | ||
198 | } | ||
199 | } | ||
200 | return msize; | ||
201 | } | ||
202 | |||
203 | |||
204 | /** | ||
205 | * Transmit the given message to the client. | 158 | * Transmit the given message to the client. |
206 | * | 159 | * |
207 | * @param client target of the message | 160 | * @param client target of the message |