static void wo_service(char *url) { int n; exec_service(webcgi_safeget("_service", "")); if ((n = atoi(webcgi_safeget("_sleep", "2"))) <= 0) n = 2; sleep(n); common_redirect(); }
void wo_upnp(char *url) { char s[256]; const char *proto; const char *eport; if (nvram_get_int("upnp_enable")) { if (((proto = webcgi_get("remove_proto")) != NULL) && (*proto) && ((eport = webcgi_get("remove_eport")) != NULL) && (*eport)) { sprintf(s, "%3s %6s\n", proto, eport); f_write_string("/etc/upnp/delete", s, 0, 0); if (killall("miniupnpd", SIGUSR2) == 0) { f_wait_notexists("/etc/upnp/delete", 5); } } } common_redirect(); }