diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-26 08:34:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-26 08:34:16 +0000 |
commit | ba1e093329d804092a363cd98bf20bf8f6945a54 (patch) | |
tree | f704fb31f90aa857f05a5801c93dfac85873baa5 /src/transport/gnunet-transport-wlan-helper.c | |
parent | d72a2a7db5088c0a8fda527cfd95e44549015e5e (diff) | |
download | gnunet-ba1e093329d804092a363cd98bf20bf8f6945a54.tar.gz gnunet-ba1e093329d804092a363cd98bf20bf8f6945a54.zip |
stuff
Diffstat (limited to 'src/transport/gnunet-transport-wlan-helper.c')
-rw-r--r-- | src/transport/gnunet-transport-wlan-helper.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index 15fe21cfd..11a7128c1 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c | |||
@@ -455,18 +455,20 @@ stdin_send (void *cls, | |||
455 | 455 | ||
456 | static void | 456 | static void |
457 | file_in_send (void *cls, | 457 | file_in_send (void *cls, |
458 | void *client, | 458 | void *client, |
459 | const struct GNUNET_MessageHeader *hdr) | 459 | const struct GNUNET_MessageHeader *hdr) |
460 | { | 460 | { |
461 | struct sendbuf * write_std = cls; | 461 | struct sendbuf * write_std = cls; |
462 | int sendsize; | 462 | uint16_t sendsize; |
463 | 463 | ||
464 | sendsize = ntohs(hdr->size); | 464 | sendsize = ntohs(hdr->size); |
465 | 465 | ||
466 | if(GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs(hdr->type)){ | 466 | if (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs(hdr->type)) |
467 | fprintf(stderr, "Function file_in_send: wrong packet type\n"); | 467 | { |
468 | exit(1); | 468 | fprintf (stderr, |
469 | } | 469 | "Function file_in_send: wrong packet type\n"); |
470 | exit(1); | ||
471 | } | ||
470 | if((sendsize + write_std->size) > MAXLINE * 2){ | 472 | if((sendsize + write_std->size) > MAXLINE * 2){ |
471 | fprintf(stderr, "Function file_in_send: Packet too big for buffer\n"); | 473 | fprintf(stderr, "Function file_in_send: Packet too big for buffer\n"); |
472 | exit(1); | 474 | exit(1); |