From: Steven Luo Date: Mon, 8 Mar 2010 09:01:23 +0000 (-0800) Subject: Tweak detection of com.nokia.osso_browser acquisition slightly X-Git-Tag: v3.3b2~12 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=aeb836f50d4f76c38a73be8517d2b626d769c316 Tweak detection of com.nokia.osso_browser acquisition slightly Instead of looking for an empty old owner string, look for a nonempty new owner string -- this picks up cases where ownership changes hands as well as cases where a previously unowned name is acquired. --- diff --git a/launcher.c b/launcher.c index 2c4fbbe..f11c3d8 100644 --- a/launcher.c +++ b/launcher.c @@ -76,9 +76,9 @@ static DBusHandlerResult check_microb_started(DBusConnection *connection, dbus_error_free(&error); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } - /* If old is an empty string, then the name has been acquired, and + /* If new is not an empty string, then the name has been acquired, and MicroB should be ready to handle our request */ - if (strlen(old) == 0) { + if (strlen(new) > 0) { log_msg("MicroB ready\n"); microb_started = 1; }