Skip to content

Commit

Permalink
Do not attempt to reconnect if dsme socket connection is closed
Browse files Browse the repository at this point in the history
When dsme exits, mce sees the dsme specific socket getting closed
before dsme dbus service drops from the system bus. Because the
dbus service is still supposedly available, reconnect attempt
is made but it only leads into spamming journal with warnings.

Use dbus service tracking from mce-dbus module for dsme too.

When eof or read error occurs on dsme socket, assume dsme has made
and exit and wait for dbus service availability changes before
attempting to reconnect.

Also skip some dsme related warnings when the device is shutting
down and not having dsme available is more or less expected.

[mce] Do not attempt to reconnect if dsme socket connection is closed. Fixes JB#26373
  • Loading branch information
spiiroin committed Feb 12, 2015
1 parent ee21424 commit b007450
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 187 deletions.
3 changes: 2 additions & 1 deletion datapipe.c
Expand Up @@ -880,7 +880,8 @@ void mce_datapipe_init(void)
0, GINT_TO_POINTER(SERVICE_STATE_UNDEF));

setup_datapipe(&dsme_available_pipe, READ_ONLY, DONT_FREE_CACHE,
0, GINT_TO_POINTER(FALSE));
0, GINT_TO_POINTER(SERVICE_STATE_UNDEF));

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
4 changes: 4 additions & 0 deletions mce-dbus.c
Expand Up @@ -3196,6 +3196,10 @@ static struct

} mce_dbus_nameowner_lut[] =
{
{
.name = DSME_DBUS_SERVICE,
.datapipe = &dsme_available_pipe,
},
{
.name = COMPOSITOR_SERVICE,
.datapipe = &compositor_available_pipe,
Expand Down
7 changes: 7 additions & 0 deletions mce-dbus.h
Expand Up @@ -27,6 +27,13 @@

#include <dbus/dbus.h>

/* ========================================================================= *
* DSME DBUS SERVICE
* ========================================================================= */

/** Well known dbus name of dsme */
#define DSME_DBUS_SERVICE "com.nokia.dsme"

/* ========================================================================= *
* COMPOSITOR DBUS SERVICE
* ========================================================================= */
Expand Down

0 comments on commit b007450

Please sign in to comment.