From: Daniel Wagner Date: Thu, 14 Apr 2011 11:45:33 +0000 (+0200) Subject: session: Call session_changed if setting changes X-Git-Tag: 0.73~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a135a7aad036da911174223288ff1b20f0c556e;p=platform%2Fupstream%2Fconnman.git session: Call session_changed if setting changes --- diff --git a/src/session.c b/src/session.c index a381af41..cf1f557d 100644 --- a/src/session.c +++ b/src/session.c @@ -788,6 +788,7 @@ static DBusMessage *connect_session(DBusConnection *conn, DBG("session %p", session); info->connect = TRUE; + session->info_dirty = TRUE; g_timeout_add_seconds(0, session_cb, session); @@ -803,6 +804,7 @@ static DBusMessage *disconnect_session(DBusConnection *conn, DBG("session %p", session); info->connect = FALSE; + session->info_dirty = TRUE; g_timeout_add_seconds(0, session_cb, session); @@ -865,6 +867,7 @@ static void update_ecall(struct connman_session *session) continue; session_iter->info.ecall = info->ecall; + session_iter->info_dirty = TRUE; g_timeout_add_seconds(0, session_cb, session_iter); } @@ -886,7 +889,6 @@ static DBusMessage *change_session(DBusConnection *conn, DBusMessageIter iter, value; const char *name; GSList *allowed_bearers; - int err; DBG("session %p", session); if (dbus_message_iter_init(msg, &iter) == FALSE) @@ -981,9 +983,8 @@ static DBusMessage *change_session(DBusConnection *conn, goto err; } - err = session_notify(session); - if (err < 0) - __connman_error_failed(msg, -err); + if (session->info_dirty == TRUE) + session_cb(session); return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);