aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-helper-transport-wlan-dummy.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-23 08:39:18 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-23 08:39:18 +0000
commitb4791cc5e8b3dc388883222f1d8fe561b7ca4bc3 (patch)
tree1044ca0853ad9b4724b6bf061a14f52498b2d00f /src/transport/gnunet-helper-transport-wlan-dummy.c
parentf289a44d046c3f7eae60944d85a1c928fc030c3d (diff)
downloadgnunet-b4791cc5e8b3dc388883222f1d8fe561b7ca4bc3.tar.gz
gnunet-b4791cc5e8b3dc388883222f1d8fe561b7ca4bc3.zip
-using cleaner message types for WLAN-HELPER IPC
Diffstat (limited to 'src/transport/gnunet-helper-transport-wlan-dummy.c')
-rw-r--r--src/transport/gnunet-helper-transport-wlan-dummy.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c
index cd545af65..86e5d4684 100644
--- a/src/transport/gnunet-helper-transport-wlan-dummy.c
+++ b/src/transport/gnunet-helper-transport-wlan-dummy.c
@@ -82,7 +82,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
82 struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage newheader; 82 struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage newheader;
83 83
84 in = (const struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *) hdr; 84 in = (const struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *) hdr;
85 if ( (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type)) || 85 if ( (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER != ntohs (hdr->type)) ||
86 (sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage) < ntohs (hdr->size)) ) 86 (sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage) < ntohs (hdr->size)) )
87 { 87 {
88 fprintf (stderr, "Function stdin_send: wrong packet type or size\n"); 88 fprintf (stderr, "Function stdin_send: wrong packet type or size\n");
@@ -96,7 +96,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
96 } 96 }
97 memset (&newheader, 0, sizeof (newheader)); 97 memset (&newheader, 0, sizeof (newheader));
98 newheader.header.size = htons (payload_size + sizeof (newheader)); 98 newheader.header.size = htons (payload_size + sizeof (newheader));
99 newheader.header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA); 99 newheader.header.type = htons (GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER);
100 newheader.frame = in->frame; 100 newheader.frame = in->frame;
101 memcpy (write_pout->buf + write_pout->size, 101 memcpy (write_pout->buf + write_pout->size,
102 &newheader, 102 &newheader,
@@ -116,12 +116,6 @@ file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
116 uint16_t sendsize; 116 uint16_t sendsize;
117 117
118 sendsize = ntohs (hdr->size); 118 sendsize = ntohs (hdr->size);
119
120 if (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA != ntohs (hdr->type))
121 {
122 fprintf (stderr, "Function file_in_send: wrong packet type\n");
123 exit (1);
124 }
125 if ((sendsize + write_std->size) > MAXLINE * 2) 119 if ((sendsize + write_std->size) > MAXLINE * 2)
126 { 120 {
127 fprintf (stderr, "Function file_in_send: Packet too big for buffer\n"); 121 fprintf (stderr, "Function file_in_send: Packet too big for buffer\n");