We can pass a properly typed Manager object here, no reason to pass it
as void*.
const char *name;
int r;
+ assert(m);
+
/* Acquire the sender's session. This first checks if the sending process is inside a session itself,
* and returns that. If not and 'consult_display' is true, this returns the display session of the
* owning user of the caller. */
}
static int create_session(
+ Manager *m,
sd_bus_message *message,
- void *userdata,
sd_bus_error *error,
uid_t uid,
pid_t leader_pid,
uint64_t flags) {
_cleanup_(pidref_done) PidRef leader = PIDREF_NULL;
- Manager *m = ASSERT_PTR(userdata);
_cleanup_free_ char *id = NULL;
Session *session = NULL;
uint32_t audit_id = 0;
SessionClass c;
int r;
+ assert(m);
assert(message);
if (!uid_is_valid(uid))
return r;
return create_session(
- message,
userdata,
+ message,
error,
uid,
leader_pid,
return r;
return create_session(
- message,
userdata,
+ message,
error,
uid,
/* leader_pid = */ 0,