Skip to content

Commit

Permalink
[appsync] Reload appsync configuration on SIGHUP. Fixes JB#38342
Browse files Browse the repository at this point in the history
Developer mode does not work immediately after installing related
packages. Developer mode does become available for selecting, but
it does not work as expected because dhcpd is not started on
activation.

This is because usb-moded fails to reload appsync configuration
upon receiving SIGHUP and previous configuration state stays
effective until usb-moded is restarted (or device rebooted).

As appsync config contains state data that is used in worker
thread, existing configuration can't be just discarded and
replaced when processing SIGHUP from control thread.

Refactor appsync logic so that it keeps track of both active and
updated configuration. Load updated configuration on SIGHUP. Then
switch active configuration on the next mode transition - so that
the previous state is retained while it might be needed.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Sep 24, 2020
1 parent 89ae6e9 commit 4899b85
Show file tree
Hide file tree
Showing 6 changed files with 547 additions and 223 deletions.
2 changes: 2 additions & 0 deletions .depend
Expand Up @@ -460,6 +460,7 @@ src/usb_moded-worker.o:\
src/usb_moded-worker.c\
config-static.h\
src/usb_moded-android.h\
src/usb_moded-appsync.h\
src/usb_moded-common.h\
src/usb_moded-configfs.h\
src/usb_moded-control.h\
Expand All @@ -475,6 +476,7 @@ src/usb_moded-worker.pic.o:\
src/usb_moded-worker.c\
config-static.h\
src/usb_moded-android.h\
src/usb_moded-appsync.h\
src/usb_moded-common.h\
src/usb_moded-configfs.h\
src/usb_moded-control.h\
Expand Down

0 comments on commit 4899b85

Please sign in to comment.