Tweak detection of com.nokia.osso_browser acquisition slightly
authorSteven Luo <steven+maemo@steven676.net>
Mon, 8 Mar 2010 09:01:23 +0000 (01:01 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Fri, 27 Aug 2010 10:37:53 +0000 (03:37 -0700)
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.

launcher.c

index 2c4fbbe..f11c3d8 100644 (file)
@@ -76,9 +76,9 @@ static DBusHandlerResult check_microb_started(DBusConnection *connection,
                dbus_error_free(&error);
                return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
        }
                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 */
           MicroB should be ready to handle our request */
-       if (strlen(old) == 0) {
+       if (strlen(new) > 0) {
                log_msg("MicroB ready\n");
                microb_started = 1;
        }
                log_msg("MicroB ready\n");
                microb_started = 1;
        }