aboutsummaryrefslogtreecommitdiff
path: root/session
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-05-14 13:07:34 +1200
committerScott Anderson <ascent12@hotmail.com>2017-05-14 13:07:34 +1200
commitf9d363fece0046cabfa00ad6b72b50f45b70db60 (patch)
tree5387efd85f29f1acdb8908cf3a479192c50846db /session
parent7efdd3c9fc38de377a43bb368cf113524b5a73d7 (diff)
Added device matching
Diffstat (limited to 'session')
-rw-r--r--session/logind.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/session/logind.c b/session/logind.c
index b6763bf9..6f0327e6 100644
--- a/session/logind.c
+++ b/session/logind.c
@@ -198,8 +198,12 @@ static int pause_device(sd_bus_message *msg, void *userdata, sd_bus_error *ret_e
goto error;
}
- dev_t dev = makedev(major, minor);
- wl_signal_emit(&session->base.device_paused, &dev);
+ struct device_arg arg = {
+ .dev = makedev(major, minor),
+ .fd = -1,
+ };
+
+ wl_signal_emit(&session->base.device_paused, &arg);
ret = sd_bus_call_method(session->bus, "org.freedesktop.login1",
session->path, "org.freedesktop.login1.Session", "PauseDeviceComplete",
@@ -226,9 +230,12 @@ static int resume_device(sd_bus_message *msg, void *userdata, sd_bus_error *ret_
goto error;
}
- // TODO: Use major/minor to make sure the right devices are getting signals
+ struct device_arg arg = {
+ .dev = makedev(major, minor),
+ .fd = fd,
+ };
- wl_signal_emit(&session->base.device_resumed, &fd);
+ wl_signal_emit(&session->base.device_resumed, &arg);
error:
return 0;