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.
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) {
log_msg("MicroB ready\n");
microb_started = 1;
}
log_msg("MicroB ready\n");
microb_started = 1;
}