#include <stdlib.h>
#include <string.h>
#include "ap-utils.h"
-#include "ap-curses.h"
+#define PRIVSETTINGS _("Privacy Settings")
#define ENCRYPT _("[E] Standard encryption mechanism: ")
#define ALLOW _("[A] Allow unencrypted: ")
#define DEFAULT _("[K] Default WEP key: ")
varbinds[1].type = NULL_VALUE;
varbinds[1].len_val = 0;
print_help(WAIT_RET);
- if (snmp(varbinds, 2, GET) <= 0) {
+ if (snmp(varbinds, 2, GET) < 2) {
print_helperr(ERR_RET);
goto exit;
}
wepid = *(varbinds[1].value);
print_help(_("EK1234 - set; W - write conf; Q - quit to menu"));
- print_title(_("Privacy Settings"));
+ print_top(NULL, PRIVSETTINGS);
sprintf(message, "%s%s", ENCRYPT, weps[wep - 1]);
mvwaddstr(main_sub, 0, 0, message);
exit:
getch();
quit:
- print_title("");
+ print_top(NULL, NULL);
clear_main(0);
}
varbinds[3].len_val = 0;
print_help(WAIT_RET);
- if (snmp(varbinds, 4, GET) <= 0) {
+ if (snmp(varbinds, 4, GET) < 4) {
print_helperr(ERR_RET);
goto exit;
}
wepid=*(varbinds[3].value);
print_help(_("AEPK1234 - set options; W - write conf; Q - quit to menu"));
- print_title(_("Privacy Settings"));
+ print_top(NULL, PRIVSETTINGS);
sprintf(message, "%s%s", ENCRYPT, weps[wep - 1]);
mvwaddstr(main_sub, 1, 0, message);
exit:
getch();
quit:
- print_title("");
+ print_top(NULL, NULL);
clear_main(0);
}