Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 18 | ||||
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index 9e0a772..29dcc75 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |||
@@ -133,2 +133,3 @@ int card_set_promisc_up (const char *device) | |||
133 | perror("Could not access the interface, "); | 133 | perror("Could not access the interface, "); |
134 | close(fd); | ||
134 | return 0; | 135 | return 0; |
@@ -142,2 +143,3 @@ int card_set_promisc_up (const char *device) | |||
142 | perror("Could not access the interface, "); | 143 | perror("Could not access the interface, "); |
144 | close(fd); | ||
143 | return 0; | 145 | return 0; |
@@ -147,4 +149,4 @@ int card_set_promisc_up (const char *device) | |||
147 | { | 149 | { |
148 | printf("%s is ok\n", device); | 150 | close(fd); |
149 | return 1; | 151 | return 1; |
150 | } | 152 | } |
@@ -152,4 +154,5 @@ int card_set_promisc_up (const char *device) | |||
152 | { | 154 | { |
153 | printf("%s flags could not be set", device); | 155 | wl_logerr("Could not set promisc flag on %d", device); |
154 | return 0; | 156 | close(fd); |
157 | return 0; | ||
155 | } | 158 | } |
@@ -174,2 +177,3 @@ int card_set_channel (const char *device, int channel, int cardtype) | |||
174 | fd = socket(AF_INET, SOCK_STREAM, 0); | 177 | fd = socket(AF_INET, SOCK_STREAM, 0); |
178 | |||
175 | if ( fd == -1 ) { | 179 | if ( fd == -1 ) { |
@@ -185,3 +189,3 @@ int card_set_channel (const char *device, int channel, int cardtype) | |||
185 | /* All was fine... */ | 189 | /* All was fine... */ |
186 | // close(fd); | 190 | close(fd); |
187 | wl_loginfo("Set channel %d on interface %s",channel, device); | 191 | wl_loginfo("Set channel %d on interface %s",channel, device); |
@@ -190,3 +194,5 @@ int card_set_channel (const char *device, int channel, int cardtype) | |||
190 | else | 194 | else |
191 | { /* iocall does not work */ | 195 | { |
196 | /* iocall does not work */ | ||
197 | close(fd); | ||
192 | wl_logerr("Could not set channel %d on %s, check cardtype",channel, device); | 198 | wl_logerr("Could not set channel %d on %s, check cardtype",channel, device); |
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh index 242d8c5..4a95956 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.hh | |||
@@ -14,2 +14,3 @@ | |||
14 | #include <sys/ioctl.h> | 14 | #include <sys/ioctl.h> |
15 | #include <unistd.h> | ||
15 | #include <linux/if.h> | 16 | #include <linux/if.h> |