mirror of
https://github.com/deadw00d/AROS.git
synced 2026-03-16 13:31:20 +00:00
Compare commits
2 Commits
7c8f22ee0d
...
cfb938e14a
| Author | SHA1 | Date | |
|---|---|---|---|
| cfb938e14a | |||
| 0ac8332c7a |
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Event loop for AmigaOS/MorphOS/AROS
|
||||
* Copyright (c) 2002-2005, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2010-2011, Neil Cafferkey
|
||||
* Copyright (c) 2010-2025, Neil Cafferkey
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@ -80,19 +80,16 @@ int eloop_init(void)
|
||||
memset(&eloop, 0, sizeof(eloop));
|
||||
|
||||
/* Open timer device */
|
||||
|
||||
if(err == 0)
|
||||
{
|
||||
if (err == 0) {
|
||||
eloop.timer_port = CreateMsgPort();
|
||||
eloop.timer_request = (APTR)CreateIORequest(eloop.timer_port,
|
||||
sizeof(struct timerequest));
|
||||
if(eloop.timer_request == NULL)
|
||||
if (eloop.timer_request == NULL)
|
||||
err = 1;
|
||||
}
|
||||
|
||||
if(err == 0)
|
||||
{
|
||||
if(OpenDevice((CONST_STRPTR)"timer.device", UNIT_VBLANK,
|
||||
if (err == 0) {
|
||||
if (OpenDevice((CONST_STRPTR)"timer.device", UNIT_VBLANK,
|
||||
(APTR)eloop.timer_request, 0) != 0) {
|
||||
err = 1;
|
||||
DeleteIORequest((APTR)eloop.timer_request);
|
||||
@ -103,9 +100,7 @@ int eloop_init(void)
|
||||
}
|
||||
|
||||
/* Use request at least once to make shutdown easier */
|
||||
|
||||
if(err == 0)
|
||||
{
|
||||
if (err == 0) {
|
||||
eloop.timer_request->tr_node.io_Command =
|
||||
TR_ADDREQUEST;
|
||||
eloop.timer_request->tr_time.tv_secs = 0;
|
||||
@ -328,6 +323,8 @@ int eloop_register_signal(int sig,
|
||||
int eloop_register_signal_terminate(eloop_signal_handler handler,
|
||||
void *user_data)
|
||||
{
|
||||
signal(SIGINT, SIG_IGN);
|
||||
|
||||
return eloop_register_signal(SIGBREAKB_CTRL_C, handler, user_data);
|
||||
}
|
||||
|
||||
@ -423,7 +420,7 @@ void eloop_destroy(void)
|
||||
}
|
||||
free(eloop.signals);
|
||||
|
||||
if(eloop.timer_request != NULL) {
|
||||
if (eloop.timer_request != NULL) {
|
||||
AbortIO((APTR) eloop.timer_request);
|
||||
WaitIO((APTR) eloop.timer_request);
|
||||
CloseDevice((APTR) eloop.timer_request);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* WPA Supplicant / main() function for Amiga-like OSes
|
||||
* Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2010-2015, Neil Cafferkey
|
||||
* Copyright (c) 2010-2025, Neil Cafferkey
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@ -45,7 +45,7 @@ typedef LONG PINT;
|
||||
#endif
|
||||
|
||||
static const TEXT template[] = "DEVICE/A,UNIT/K/N,CONFIG/K,VERBOSE/S,NOGUI/S";
|
||||
const TEXT version_string[] = "$VER: WirelessManager 1.6 (8.3.2015)";
|
||||
const TEXT version_string[] = "$VER: WirelessManager 1.8 (29.11.2025)";
|
||||
static const TEXT config_file_name[] = "ENV:Sys/Wireless.prefs";
|
||||
|
||||
|
||||
@ -139,7 +139,6 @@ int main(int argc, char *argv[])
|
||||
out:
|
||||
os_free(ifaces);
|
||||
|
||||
// os_program_deinit();
|
||||
#ifdef MUI_GUI
|
||||
stop_gui();
|
||||
#endif
|
||||
@ -153,6 +152,8 @@ out:
|
||||
if (error != 0)
|
||||
exitcode = RETURN_FAIL;
|
||||
|
||||
os_program_deinit();
|
||||
|
||||
return exitcode;
|
||||
}
|
||||
|
||||
@ -171,6 +172,7 @@ void stop_gui(void)
|
||||
{
|
||||
if (gui_proc != NULL)
|
||||
{
|
||||
SetSignal(0, SIGF_SINGLE);
|
||||
Signal((struct Task *) gui_proc, SIGBREAKF_CTRL_C);
|
||||
Wait(SIGF_SINGLE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user