Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/proto.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/proto.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/proto.cc b/noncore/net/wellenreiter/libwellenreiter/source/proto.cc index 359bdb5..305f401 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/proto.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/proto.cc | |||
@@ -1,21 +1,21 @@ | |||
1 | /* | 1 | /* |
2 | * Communication protocol | 2 | * Communication protocol |
3 | * | 3 | * |
4 | * $Id$ | 4 | * $Id$ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include "proto.hh" | 7 | #include "proto.hh" |
8 | #include "sock.hh" | 8 | #include "sock.hh" |
9 | 9 | ||
10 | /* Send found network to GUI */ | 10 | /* Send found network to GUI */ |
11 | int send_network_found (const char *guihost, int guiport, void *structure) | 11 | int send_network_found (const char *guihost, int guiport, void *structure) |
12 | { | 12 | { |
13 | wl_network_t *ptr; | 13 | wl_network_t *ptr; |
14 | char buffer[2048]; | 14 | char buffer[2048]; |
15 | char temp[4]; | 15 | char temp[5]; |
16 | 16 | ||
17 | ptr = (wl_network_t *)structure; | 17 | ptr = (wl_network_t *)structure; |
18 | 18 | ||
19 | memset(buffer, 0, 2048); | 19 | memset(buffer, 0, 2048); |
20 | 20 | ||
21 | /* Type = Found new net */ | 21 | /* Type = Found new net */ |
@@ -53,15 +53,20 @@ int send_network_found (const char *guihost, int guiport, void *structure) | |||
53 | snprintf(temp, 4, "00%d", ptr->ssid_len); | 53 | snprintf(temp, 4, "00%d", ptr->ssid_len); |
54 | else | 54 | else |
55 | snprintf(temp, 4, "0%d", ptr->ssid_len); | 55 | snprintf(temp, 4, "0%d", ptr->ssid_len); |
56 | 56 | ||
57 | memcpy(buffer + 23, temp, 3); | 57 | memcpy(buffer + 23, temp, 3); |
58 | 58 | ||
59 | fprintf( stderr, "Temp is %s\n", temp ); | ||
60 | fprintf( stderr, "ssid_len is %d\n", ptr->ssid_len ); | ||
61 | |||
59 | /* Set ssid */ | 62 | /* Set ssid */ |
60 | memcpy(buffer + 26, ptr->bssid, ptr->ssid_len); | 63 | memcpy(buffer + 26, ptr->bssid, ptr->ssid_len); |
61 | 64 | ||
65 | fprintf( stderr, "Buffer is %s\n", buffer ); | ||
66 | |||
62 | /* Send prepared buffer to GUI */ | 67 | /* Send prepared buffer to GUI */ |
63 | sendcomm(guihost, guiport, buffer); | 68 | sendcomm(guihost, guiport, buffer); |
64 | 69 | ||
65 | return 1; | 70 | return 1; |
66 | } | 71 | } |
67 | 72 | ||