diff options
author | David Brodski <david@brodski.eu> | 2011-05-22 10:48:52 +0000 |
---|---|---|
committer | David Brodski <david@brodski.eu> | 2011-05-22 10:48:52 +0000 |
commit | fbd6c9f4039228a3b1f2bbe4bd8973da5a10539f (patch) | |
tree | 8b6ef3836101b5365cd3d2a78b24a9b488a56f8a /src/transport/wlan | |
parent | 6ce656812a23d9037fbd37b5867b35ee4ef63908 (diff) | |
download | gnunet-fbd6c9f4039228a3b1f2bbe4bd8973da5a10539f.tar.gz gnunet-fbd6c9f4039228a3b1f2bbe4bd8973da5a10539f.zip |
Removed the 2 seconds wait
Diffstat (limited to 'src/transport/wlan')
-rw-r--r-- | src/transport/wlan/loopback_helper.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/transport/wlan/loopback_helper.c b/src/transport/wlan/loopback_helper.c index 328baaa02..20a5f1ee3 100644 --- a/src/transport/wlan/loopback_helper.c +++ b/src/transport/wlan/loopback_helper.c | |||
@@ -261,53 +261,6 @@ testmode(int argc, char *argv[]) | |||
261 | 261 | ||
262 | write_std.size = send_mac_to_plugin((char *) write_std.buf, macaddr.mac); | 262 | write_std.size = send_mac_to_plugin((char *) write_std.buf, macaddr.mac); |
263 | 263 | ||
264 | /* | ||
265 | //wait | ||
266 | tv.tv_sec = 2; | ||
267 | tv.tv_usec = 0; | ||
268 | retval = select(0, NULL, NULL, NULL, &tv); | ||
269 | |||
270 | |||
271 | tv.tv_sec = 3; | ||
272 | tv.tv_usec = 0; | ||
273 | // if there is something to write | ||
274 | FD_ZERO(&wfds); | ||
275 | FD_SET(STDOUT_FILENO, &wfds); | ||
276 | |||
277 | retval = select(STDOUT_FILENO + 1, NULL, &wfds, NULL, &tv); | ||
278 | |||
279 | if (FD_ISSET(STDOUT_FILENO, &wfds)) | ||
280 | { | ||
281 | ret = write(STDOUT_FILENO, write_std.buf + write_std.pos, write_std.size | ||
282 | - write_std.pos); | ||
283 | |||
284 | if (0 > ret) | ||
285 | { | ||
286 | closeprog = 1; | ||
287 | fprintf(stderr, "Write ERROR to STDOUT"); | ||
288 | exit(1); | ||
289 | } | ||
290 | else | ||
291 | { | ||
292 | write_std.pos += ret; | ||
293 | // check if finished | ||
294 | if (write_std.pos == write_std.size) | ||
295 | { | ||
296 | write_std.pos = 0; | ||
297 | write_std.size = 0; | ||
298 | } | ||
299 | } | ||
300 | } | ||
301 | |||
302 | memcpy(&write_std.buf, &macmsg, sizeof(struct Wlan_Helper_Control_Message)); | ||
303 | write_std.size = sizeof(struct Wlan_Helper_Control_Message); | ||
304 | */ | ||
305 | |||
306 | //wait | ||
307 | tv.tv_sec = 2; | ||
308 | tv.tv_usec = 0; | ||
309 | select(0, NULL, NULL, NULL, &tv); | ||
310 | |||
311 | while (0 == closeprog) | 264 | while (0 == closeprog) |
312 | { | 265 | { |
313 | 266 | ||