run/run: fix invocation ID handling

Fixes a regression introduced by 8157cc0e3e.
This commit is contained in:
Yu Watanabe 2024-04-24 14:58:07 +09:00 committed by Luca Boccassi
parent 68ee2ba1ee
commit 90db1582a9
2 changed files with 4 additions and 5 deletions

View File

@ -1610,7 +1610,7 @@ static int acquire_invocation_id(sd_bus *bus, const char *unit, sd_id128_t *ret)
if (r < 0)
return bus_log_parse_error(r);
return 0;
return r; /* Return true when we get a non-null invocation ID. */
}
static void set_window_title(PTYForward *f) {

View File

@ -914,16 +914,15 @@ int bus_message_read_id128(sd_bus_message *m, sd_id128_t *ret) {
case 0:
if (ret)
*ret = SD_ID128_NULL;
break;
return 0;
case sizeof(sd_id128_t):
if (ret)
memcpy(ret, a, sz);
break;
return !memeqzero(a, sz); /* This intends to sd_id128_is_null(), but ret may be NULL, so
* let'suse memeqzero() here. */
default:
return -EINVAL;
}
return 0;
}