mainloop: Only connect to NOTIFY_SOCKET if STATUS=Starting up
Luiz Augusto von Dentz
maintainerPATCH 1/1 mainloop: Only connect to NOTIFY_SOCKET if STATUS=Starting up
From: Luiz Augusto von Dentz <[email protected]>
This makes the handling of NOYIFY_SOCKET conditional to only when application attempts to set STATUS=Starting up which means it is intentionally requiring it.
--- src/shared/mainloop-glib.c | 1 - src/shared/mainloop-notify.c | 11 +++++++++-- src/shared/mainloop.c | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-)
src/shared/mainloop-glib.c +0 -1
@@ -33,7 +33,6 @@ static int exit_status;void mainloop_init (void ) { main_loop =g_main_loop_new (NULL , FALSE); -mainloop_notify_init (); }void mainloop_quit (void )
src/shared/mainloop-notify.c +9 -2
@@ -111,8 +111,15 @@ int mainloop_sd_notify(const char *state) {int err; -if (notify_fd <=0 ) -return -ENOTCONN ; +if (notify_fd <=0 ) { +if (strcmp (state,"STATUS=Starting up" )) +return -ENOTCONN ; + +/* Auto init only when starting up */ +mainloop_notify_init (); +if (notify_fd <=0 ) +return -ENOTCONN ; + } err =send (notify_fd, state,strlen (state),MSG_NOSIGNAL );if (err <0 )
src/shared/mainloop.c +0 -2
@@ -65,8 +65,6 @@ void mainloop_init(void) mainloop_list[i] =NULL ; epoll_terminate =0 ; - -mainloop_notify_init (); }void mainloop_quit (void )
Signature · 1 line
2.49.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=959149
---Test result---
Test Summary:
CheckPatch PENDING 0.31 seconds GitLint PENDING 0.27 seconds BuildEll PASS 20.65 seconds BluezMake PASS 2664.76 seconds MakeCheck PASS 19.84 seconds MakeDistcheck PASS 198.66 seconds CheckValgrind PASS 275.00 seconds CheckSmatch PASS 303.06 seconds bluezmakeextell PASS 128.52 seconds IncrementalBuild PENDING 0.27 seconds ScanBuild PASS 905.76 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth