aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-04-07 08:40:34 (GMT)
committerJouni Malinen <j@w1.fi>2010-04-07 08:40:34 (GMT)
commitb242d398f8b3a84d759f408e8e461b22c8a2407d (patch)
treeba8d4777c512b8b15c69ae61551c177213f37e1a /hostapd/hostapd_cli.c
parentbae92174748ea2279e9db5857cba56715038cc8b (diff)
downloadhostap-b242d398f8b3a84d759f408e8e461b22c8a2407d.zip
hostap-b242d398f8b3a84d759f408e8e461b22c8a2407d.tar.gz
hostap-b242d398f8b3a84d759f408e8e461b22c8a2407d.tar.bz2
Use more os.h wrapper functions in hostapd_cli
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 994c76a..215b4e4 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -791,8 +791,8 @@ int main(int argc, char *argv[])
printf("%s\n", hostapd_cli_version);
return 0;
case 'i':
- free(ctrl_ifname);
- ctrl_ifname = strdup(optarg);
+ os_free(ctrl_ifname);
+ ctrl_ifname = os_strdup(optarg);
break;
case 'p':
ctrl_iface_dir = optarg;
@@ -816,12 +816,13 @@ int main(int argc, char *argv[])
DIR *dir = opendir(ctrl_iface_dir);
if (dir) {
while ((dent = readdir(dir))) {
- if (strcmp(dent->d_name, ".") == 0 ||
- strcmp(dent->d_name, "..") == 0)
+ if (os_strcmp(dent->d_name, ".") == 0
+ ||
+ os_strcmp(dent->d_name, "..") == 0)
continue;
printf("Selected interface '%s'\n",
dent->d_name);
- ctrl_ifname = strdup(dent->d_name);
+ ctrl_ifname = os_strdup(dent->d_name);
break;
}
closedir(dir);
@@ -844,7 +845,7 @@ int main(int argc, char *argv[])
printf("Could not connect to hostapd - re-trying\n");
warning_displayed = 1;
}
- sleep(1);
+ os_sleep(1, 0);
continue;
}