aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-helper-transport-bluetooth.c
diff options
context:
space:
mode:
authorClaudiu Olteanu <claudiu@140774ce-b5e7-0310-ab8b-a85725594a96>2013-09-22 17:30:53 +0000
committerClaudiu Olteanu <claudiu@140774ce-b5e7-0310-ab8b-a85725594a96>2013-09-22 17:30:53 +0000
commitdc07a7575ed89a6d3ab63912a76e8bffed767128 (patch)
tree77027fee1e33a0914a7e7ff3c38e7aa11f90ce21 /src/transport/gnunet-helper-transport-bluetooth.c
parent0d8788deb35bfe9e2a16d94ca015af05d077cba7 (diff)
downloadgnunet-dc07a7575ed89a6d3ab63912a76e8bffed767128.tar.gz
gnunet-dc07a7575ed89a6d3ab63912a76e8bffed767128.zip
Removing some log messages
Diffstat (limited to 'src/transport/gnunet-helper-transport-bluetooth.c')
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c
index 14551d3b5..d46b818a6 100644
--- a/src/transport/gnunet-helper-transport-bluetooth.c
+++ b/src/transport/gnunet-helper-transport-bluetooth.c
@@ -2148,8 +2148,6 @@ main (int argc, char *argv[])
2148 2148
2149 stdin_mst = mst_create (&stdin_send_hw, &dev); 2149 stdin_mst = mst_create (&stdin_send_hw, &dev);
2150 stdin_open = 1; 2150 stdin_open = 1;
2151
2152 fprintf (stderr, "\n-----------------------------------------------\n Check if the program exits\n-----------------------------------------------\n");
2153 2151
2154 int pos = 0; 2152 int pos = 0;
2155 int stdin_pos = -1; 2153 int stdin_pos = -1;
@@ -2167,21 +2165,18 @@ main (int argc, char *argv[])
2167 { 2165 {
2168 stdin_pos = pos; 2166 stdin_pos = pos;
2169 pos +=1; 2167 pos +=1;
2170 fprintf (stderr, "LOG: set STDIN_FILENO\n");
2171 GNUNET_NETWORK_fdset_handle_set (rfds, (struct GNUNET_DISK_FileHandle*) &stdin_handle); 2168 GNUNET_NETWORK_fdset_handle_set (rfds, (struct GNUNET_DISK_FileHandle*) &stdin_handle);
2172 } 2169 }
2173 2170
2174 if (0 == write_std.size) 2171 if (0 == write_std.size)
2175 { 2172 {
2176 pos += 1; 2173 pos += 1;
2177 fprintf (stderr, "LOG: set the listening socket %d\n", GNUNET_NETWORK_get_fd (dev.handle));
2178 GNUNET_NETWORK_fdset_set (rfds, dev.handle); 2174 GNUNET_NETWORK_fdset_set (rfds, dev.handle);
2179 } 2175 }
2180 2176
2181 for (i = 0; i < crt_rfds; i++) 2177 for (i = 0; i < crt_rfds; i++)
2182 { 2178 {
2183 pos += 1; 2179 pos += 1;
2184 fprintf (stderr, "LOG: adding %d read socket\n", i);
2185 GNUNET_NETWORK_fdset_set (rfds, rfds_list[i]); 2180 GNUNET_NETWORK_fdset_set (rfds, rfds_list[i]);
2186 } 2181 }
2187 2182
@@ -2189,7 +2184,6 @@ main (int argc, char *argv[])
2189 if (0 < write_std.size) 2184 if (0 < write_std.size)
2190 { 2185 {
2191 stdout_pos = pos; 2186 stdout_pos = pos;
2192 fprintf (stderr, "LOG: set STDOUT_FILENO\n");
2193 GNUNET_NETWORK_fdset_handle_set (wfds, (struct GNUNET_DISK_FileHandle*) &stdout_handle); 2187 GNUNET_NETWORK_fdset_handle_set (wfds, (struct GNUNET_DISK_FileHandle*) &stdout_handle);
2194 // printf ("%s\n", write_std.buf); 2188 // printf ("%s\n", write_std.buf);
2195 // memset (write_std.buf, 0, write_std.size); 2189 // memset (write_std.buf, 0, write_std.size);
@@ -2199,7 +2193,7 @@ main (int argc, char *argv[])
2199 if (0 < write_pout.size) 2193 if (0 < write_pout.size)
2200 { 2194 {
2201 if (strcmp (argv[1], "ff:ff:ff:ff:ff:ff") == 0) { 2195 if (strcmp (argv[1], "ff:ff:ff:ff:ff:ff") == 0) {
2202 fprintf(stderr, "BROADCAST! Skipping the message\n"); 2196 fprintf(stderr, "LOG: BROADCAST! Skipping the message\n");
2203 // skip the message 2197 // skip the message
2204 broadcast = 1; 2198 broadcast = 1;
2205 memset (write_pout.buf, 0, write_pout.size); 2199 memset (write_pout.buf, 0, write_pout.size);
@@ -2257,18 +2251,15 @@ main (int argc, char *argv[])
2257 2251
2258 if (broadcast == 0) 2252 if (broadcast == 0)
2259 { 2253 {
2260 fprintf (stderr, "before select\n");
2261 int retval = GNUNET_NETWORK_socket_select (rfds, wfds, NULL, GNUNET_TIME_relative_get_forever_()); 2254 int retval = GNUNET_NETWORK_socket_select (rfds, wfds, NULL, GNUNET_TIME_relative_get_forever_());
2262 fprintf (stderr, "after select %d\n", retval);
2263 if (retval < 0) 2255 if (retval < 0)
2264 { 2256 {
2265 fprintf (stderr, "select error\n"); 2257 fprintf (stderr, "Select error\n");
2266 ExitProcess (2); 2258 ExitProcess (2);
2267 } 2259 }
2268 //if (GNUNET_NETWORK_fdset_isset (wfds, (struct GNUNET_NETWORK_Handle*)&stdout_handle)) 2260 //if (GNUNET_NETWORK_fdset_isset (wfds, (struct GNUNET_NETWORK_Handle*)&stdout_handle))
2269 if (retval == stdout_pos) 2261 if (retval == stdout_pos)
2270 { 2262 {
2271 fprintf (stderr, "-------------STDOUT------------\n");
2272 fprintf(stderr, "LOG : sends a message to STDOUT\n"); //FIXME: debugging message 2263 fprintf(stderr, "LOG : sends a message to STDOUT\n"); //FIXME: debugging message
2273 //ssize_t ret; 2264 //ssize_t ret;
2274 //ret = GNUNET_NETWORK_socket_send ((struct GNUNET_NETWORK_Handle *)&stdout_handle, write_std.buf + write_std.pos, write_std.size - write_std.pos); 2265 //ret = GNUNET_NETWORK_socket_send ((struct GNUNET_NETWORK_Handle *)&stdout_handle, write_std.buf + write_std.pos, write_std.size - write_std.pos);
@@ -2339,7 +2330,6 @@ main (int argc, char *argv[])
2339 //if (GNUNET_NETWORK_fdset_isset (rfds, (struct GNUNET_NETWORK_Handle*)&stdin_handle)) 2330 //if (GNUNET_NETWORK_fdset_isset (rfds, (struct GNUNET_NETWORK_Handle*)&stdin_handle))
2340 if (retval == stdin_pos) 2331 if (retval == stdin_pos)
2341 { 2332 {
2342 fprintf (stderr, "-------------STDIN------------\n");
2343 //ssize_t ret; 2333 //ssize_t ret;
2344 //ret = GNUNET_NETWORK_socket_recv ((struct GNUNET_NETWORK_Handle *)&stdin_handle, readbuf, sizeof (write_pout.buf)); 2334 //ret = GNUNET_NETWORK_socket_recv ((struct GNUNET_NETWORK_Handle *)&stdin_handle, readbuf, sizeof (write_pout.buf));
2345 //ret = read (STDIN_FILENO, readbuf, sizeof (readbuf)); 2335 //ret = read (STDIN_FILENO, readbuf, sizeof (readbuf));
@@ -2403,7 +2393,6 @@ main (int argc, char *argv[])
2403 - sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage) 2393 - sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage)
2404 + sizeof (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame), 2394 + sizeof (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame),
2405 rrm); 2395 rrm);
2406 fprintf (stderr, "MESSAGE: %s\n", readbuf);
2407 if (0 >= ret) 2396 if (0 >= ret)
2408 { 2397 {
2409 2398