mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
winws: remove unnecesessary code
This commit is contained in:
parent
742b3a6db0
commit
c05e62586b
@ -1540,10 +1540,6 @@ int main(int argc, char **argv)
|
|||||||
ex:
|
ex:
|
||||||
rawsend_cleanup();
|
rawsend_cleanup();
|
||||||
cleanup_params();
|
cleanup_params();
|
||||||
#ifdef __CYGWIN__
|
|
||||||
service_stopped();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return result;
|
return result;
|
||||||
exiterr:
|
exiterr:
|
||||||
result = 1;
|
result = 1;
|
||||||
|
17
nfq/win.c
17
nfq/win.c
@ -19,8 +19,6 @@ void service_main(int argc __attribute__((unused)), char *argv[] __attribute__((
|
|||||||
|
|
||||||
bool service_run(int argc, char *argv[])
|
bool service_run(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
SERVICE_TABLE_ENTRY ServiceTable[] = {
|
SERVICE_TABLE_ENTRY ServiceTable[] = {
|
||||||
{SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION)service_main},
|
{SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION)service_main},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
@ -37,10 +35,6 @@ static void service_set_status(DWORD state)
|
|||||||
ServiceStatus.dwCurrentState = state;
|
ServiceStatus.dwCurrentState = state;
|
||||||
SetServiceStatus(hStatus, &ServiceStatus);
|
SetServiceStatus(hStatus, &ServiceStatus);
|
||||||
}
|
}
|
||||||
void service_stopped()
|
|
||||||
{
|
|
||||||
service_set_status(SERVICE_STOPPED);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Control handler function
|
// Control handler function
|
||||||
void service_controlhandler(DWORD request)
|
void service_controlhandler(DWORD request)
|
||||||
@ -50,18 +44,13 @@ void service_controlhandler(DWORD request)
|
|||||||
case SERVICE_CONTROL_STOP:
|
case SERVICE_CONTROL_STOP:
|
||||||
case SERVICE_CONTROL_SHUTDOWN:
|
case SERVICE_CONTROL_SHUTDOWN:
|
||||||
bQuit = true;
|
bQuit = true;
|
||||||
service_set_status(SERVICE_STOP_PENDING);
|
ServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// Report current status
|
|
||||||
SetServiceStatus(hStatus, &ServiceStatus);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
SetServiceStatus(hStatus, &ServiceStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void service_main(int argc __attribute__((unused)),
|
void service_main(int argc __attribute__((unused)), char *argv[] __attribute__((unused)))
|
||||||
char *argv[] __attribute__((unused)))
|
|
||||||
{
|
{
|
||||||
ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||||
ServiceStatus.dwCurrentState = SERVICE_RUNNING;
|
ServiceStatus.dwCurrentState = SERVICE_RUNNING;
|
||||||
|
Loading…
Reference in New Issue
Block a user