4 files changed, 19 insertions, 19 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index c29f4d0..7362f14 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |||
@@ -22,3 +22,3 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) | |||
22 | 22 | ||
23 | /* Setting the prmiscous and up flag to the interface */ | 23 | /* Setting the promiscous and up flag to the interface */ |
24 | if (!card_set_promisc_up(device)) | 24 | if (!card_set_promisc_up(device)) |
@@ -66,3 +66,3 @@ int card_set_promisc_up (const char *device) | |||
66 | { | 66 | { |
67 | char ifconfigcmd[32]; | 67 | char ifconfigcmd[48]; |
68 | int retval=0; | 68 | int retval=0; |
@@ -72,6 +72,3 @@ int card_set_promisc_up (const char *device) | |||
72 | 72 | ||
73 | if(retval != 0) | 73 | return (retval ? 0 : 1); |
74 | return 0; | ||
75 | |||
76 | return 1; | ||
77 | } | 74 | } |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc index e2169ca..9b4e360 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/sniff.cc | |||
@@ -126,3 +126,7 @@ void process_packets(const struct pcap_pkthdr *pkthdr, const unsigned char *pack | |||
126 | 126 | ||
127 | send_network_found((char *)guihost, guiport, &wl_net); | 127 | if(!send_network_found((char *)guihost, guiport, &wl_net)) |
128 | { | ||
129 | wl_logerr("Error sending data to UI: %s", strerror(errno)); | ||
130 | break; | ||
131 | } | ||
128 | wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); | 132 | wl_loginfo("Sent network to GUI '%s:%d'", guihost, guiport); |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc b/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc index f15523f..5317f52 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc | |||
@@ -37,6 +37,7 @@ int get_field(const char *buffer, char *out) | |||
37 | 37 | ||
38 | return atoi(len) + 3; | 38 | /* Return length of whole field (including 3 byte length) */ |
39 | return (atoi(len) + 3); | ||
39 | } | 40 | } |
40 | 41 | ||
41 | /* Send found network to GUI */ | 42 | /* Send found network to UI */ |
42 | int send_network_found (const char *guihost, int guiport, void *structure) | 43 | int send_network_found (const char *guihost, int guiport, void *structure) |
@@ -77,3 +78,3 @@ int send_network_found (const char *guihost, int guiport, void *structure) | |||
77 | /* Set Mac */ | 78 | /* Set Mac */ |
78 | retval = add_field(buffer + len, (char *)ptr->mac, 17); | 79 | retval = add_field(buffer + len, ptr->mac, 17); |
79 | len += retval; | 80 | len += retval; |
@@ -81,12 +82,10 @@ int send_network_found (const char *guihost, int guiport, void *structure) | |||
81 | /* Set ssid */ | 82 | /* Set ssid */ |
82 | retval = add_field(buffer + len, (char *)ptr->bssid, ptr->ssid_len); | 83 | retval = add_field(buffer + len, ptr->bssid, ptr->ssid_len); |
83 | 84 | ||
84 | /* Send prepared buffer to GUI */ | 85 | /* Send prepared buffer to UI */ |
85 | #ifdef DEBUG | 86 | #ifdef DEBUG |
86 | wl_loginfo("Sending network to GUI: '%s'", buffer); | 87 | wl_loginfo("Sending network to UI: '%s'", buffer); |
87 | #endif | 88 | #endif |
88 | 89 | ||
89 | wl_send(guihost, guiport, buffer); | 90 | return ((!wl_send(guihost, guiport, buffer)) ? 0 : 1); |
90 | |||
91 | return 1; | ||
92 | } | 91 | } |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc b/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc index 5714afb..4942fba 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc | |||
@@ -58,3 +58,3 @@ int wl_send(const char *host, int port, const char *string, ...) | |||
58 | wl_logerr("Cannot set up socket: %s", strerror(errno)); | 58 | wl_logerr("Cannot set up socket: %s", strerror(errno)); |
59 | return -1; | 59 | return 0; |
60 | } | 60 | } |
@@ -65,3 +65,3 @@ int wl_send(const char *host, int port, const char *string, ...) | |||
65 | close(sock); | 65 | close(sock); |
66 | return -1; | 66 | return 0; |
67 | } | 67 | } |
@@ -71,3 +71,3 @@ int wl_send(const char *host, int port, const char *string, ...) | |||
71 | 71 | ||
72 | return 0; | 72 | return 1; |
73 | } | 73 | } |