author | mjm <mjm> | 2002-12-28 12:59:38 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-12-28 12:59:38 (UTC) |
commit | 1adf0d153cd8c4714719183af45ed703abef0a43 (patch) (unidiff) | |
tree | 8845f1bbee4d050a18a6e5fa970bb5adaa277bc0 /noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |
parent | 7a6a55d19048de7920eb885e80a26e1bef0f66e4 (diff) | |
download | opie-1adf0d153cd8c4714719183af45ed703abef0a43.zip opie-1adf0d153cd8c4714719183af45ed703abef0a43.tar.gz opie-1adf0d153cd8c4714719183af45ed703abef0a43.tar.bz2 |
cleanup
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 9 |
1 files changed, 3 insertions, 6 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 | |||
@@ -20,7 +20,7 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) | |||
20 | return 0; | 20 | return 0; |
21 | } | 21 | } |
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)) |
25 | { | 25 | { |
26 | wl_logerr("Cannot set interface to promisc mode: %s", strerror(errno)); | 26 | wl_logerr("Cannot set interface to promisc mode: %s", strerror(errno)); |
@@ -64,14 +64,11 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) | |||
64 | /* Set card into promisc mode */ | 64 | /* Set card into promisc mode */ |
65 | int card_set_promisc_up (const char *device) | 65 | 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; |
69 | 69 | ||
70 | snprintf(ifconfigcmd, sizeof(ifconfigcmd) - 1, SBIN_PATH, device); | 70 | snprintf(ifconfigcmd, sizeof(ifconfigcmd) - 1, SBIN_PATH, device); |
71 | retval = system(ifconfigcmd); | 71 | retval = system(ifconfigcmd); |
72 | 72 | ||
73 | if(retval != 0) | 73 | return (retval ? 0 : 1); |
74 | return 0; | ||
75 | |||
76 | return 1; | ||
77 | } | 74 | } |