From e9fc5fd1bdf29434238410113abf74ba7b1546cb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 11 Aug 2003 16:19:06 +0000 Subject: build fixes remove fprintfs git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@5 022f378f-78c4-0310-b860-d162c87e6274 --- src/iwkey.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/iwkey.c') diff --git a/src/iwkey.c b/src/iwkey.c index b4b44c5..a3403a8 100644 --- a/src/iwkey.c +++ b/src/iwkey.c @@ -24,6 +24,8 @@ #include #include +#include + #include "iwkey.h" #include "wireless.h" #include "util.h" @@ -35,7 +37,7 @@ int wep_key_add(struct interface *i, uint8_t w[WEP_KEY_LEN]) { assert(i); if (n_used_keys >= n_max_keys) { - fprintf(stderr, "Too many keys added!\n"); + daemon_log(LOG_ERR, "Too many keys added!\n"); return -1; } @@ -47,7 +49,7 @@ int wep_key_add(struct interface *i, uint8_t w[WEP_KEY_LEN]) { req.u.encoding.flags = key_map[n_used_keys++]+1; if (ioctl(i->fd, SIOCSIWENCODE, &req) < 0) { - fprintf(stderr, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); return -1; } @@ -70,7 +72,7 @@ int wep_key_finish(struct interface *i) { req.u.encoding.flags = (key_map[n_used_keys-1]+1); if (ioctl(i->fd, SIOCGIWENCODE, &req) < 0) { - fprintf(stderr, "ioctl(SIOCGIWENCODE): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "ioctl(SIOCGIWENCODE): %s\n", strerror(errno)); return -1; } @@ -83,7 +85,7 @@ int wep_key_finish(struct interface *i) { req.u.encoding.flags = (key_map[j]+1); if (ioctl(i->fd, SIOCSIWENCODE, &req) < 0) { - fprintf(stderr, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); return -1; } } @@ -97,7 +99,7 @@ int wep_key_finish(struct interface *i) { req.u.encoding.flags = IW_ENCODE_RESTRICTED; if (ioctl(i->fd, SIOCSIWENCODE, &req) < 0) { - fprintf(stderr, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "ioctl(SIOCSIWENCODE): %s\n", strerror(errno)); return -1; } -- cgit