Skip to content

Commit

Permalink
Do not required dsme to be running when mce starts up
Browse files Browse the repository at this point in the history
Previously mce could not be started unless dsme was running and was
forced to exit if dsme stopped/crashed.

Now mce tracks availability of dsme by watching D-Bus name ownership
changes of com.nokia.dsme on system bus and makes connection when
dsme is up and running.

While dsme is not available process watchdog ping-pong based heartbeat
activities do not get triggered and shutdown requests can't be made.

I/O errors during socket IPC with dsme trigger re-connect attempt.

Also the mce --debug-mode command line option is removed since it is not
needed anymore.

[mce] Do not required dsme to be running when mce starts up. Fixes JB#11581
  • Loading branch information
spiiroin committed Jun 17, 2014
1 parent 221b36b commit ecd3eba
Show file tree
Hide file tree
Showing 6 changed files with 356 additions and 174 deletions.
6 changes: 6 additions & 0 deletions datapipe.c
Expand Up @@ -151,6 +151,9 @@ datapipe_struct heartbeat_pipe;
/** lipstick availability; read only */
datapipe_struct lipstick_available_pipe;

/** dsme availability; read only */
datapipe_struct dsme_available_pipe;

/** PackageKit Locked status; read only */
datapipe_struct packagekit_locked_pipe;

Expand Down Expand Up @@ -851,6 +854,8 @@ void mce_datapipe_init(void)
0, GINT_TO_POINTER(0));
setup_datapipe(&lipstick_available_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(FALSE));
setup_datapipe(&dsme_available_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(FALSE));
setup_datapipe(&packagekit_locked_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(FALSE));
setup_datapipe(&update_mode_pipe, READ_ONLY, DONT_FREE_CACHE,
Expand Down Expand Up @@ -914,6 +919,7 @@ void mce_datapipe_quit(void)
free_datapipe(&system_state_pipe);
free_datapipe(&heartbeat_pipe);
free_datapipe(&lipstick_available_pipe);
free_datapipe(&dsme_available_pipe);
free_datapipe(&packagekit_locked_pipe);
free_datapipe(&update_mode_pipe);
free_datapipe(&device_lock_active_pipe);
Expand Down
1 change: 1 addition & 0 deletions datapipe.h
Expand Up @@ -114,6 +114,7 @@ extern datapipe_struct power_saving_mode_pipe;
extern datapipe_struct thermal_state_pipe;
extern datapipe_struct heartbeat_pipe;
extern datapipe_struct lipstick_available_pipe;
extern datapipe_struct dsme_available_pipe;
extern datapipe_struct packagekit_locked_pipe;
extern datapipe_struct update_mode_pipe;
extern datapipe_struct device_lock_active_pipe;
Expand Down

0 comments on commit ecd3eba

Please sign in to comment.