FreeBSD Bugzilla – Attachment 242273 Details for
Bug 271508
net/mpd5: Link auto-redial after SIGUSR2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to keep link closed after USR2 signal until USR1 is received.
mpd5-patch-signal-redial (text/plain), 920 bytes, created by
mickey242
on 2023-05-19 11:04:56 UTC
(
hide
)
Description:
Patch to keep link closed after USR2 signal until USR1 is received.
Filename:
MIME Type:
Creator:
mickey242
Created:
2023-05-19 11:04:56 UTC
Size:
920 bytes
patch
obsolete
>--- src/main.c.bak 2023-05-18 09:53:08.598036000 +0200 >+++ src/main.c 2023-05-18 10:13:16.274665000 +0200 >@@ -83,6 +83,12 @@ > /* How long to wait for graceful shutdown when we recieve a SIGTERM */ > #define TERMINATE_DEATH_WAIT (2 * SECONDS) > >+ /* Used to prevent auto-up on links closed manually */ >+ enum { >+ LINK_ADMINSTATE_DOWN = 0, >+ LINK_ADMINSTATE_OPERATIONAL >+ }; >+ > /* > * GLOBAL VARIABLES > */ >@@ -556,11 +562,13 @@ > if (sig == SIGUSR1) { > Log(LG_ALWAYS, ("[%s] rec'd signal %s, opening", > l->name, sys_signame[sig])); >+ l->admin_state = LINK_ADMINSTATE_OPERATIONAL; > RecordLinkUpDownReason(NULL, l, 1, STR_MANUALLY, NULL); > LinkOpen(l); > } else { > Log(LG_ALWAYS, ("[%s] rec'd signal %s, closing", > l->name, sys_signame[sig])); >+ l->admin_state = LINK_ADMINSTATE_DOWN; > RecordLinkUpDownReason(NULL, l, 0, STR_MANUALLY, NULL); > LinkClose(l); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271508
: 242273 |
242276