projects
/
profile
/
ivi
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
65772ce
)
Put the fd in the closure so debugging can print it
author
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 19 Jan 2011 19:11:48 +0000
(14:11 -0500)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 19 Jan 2011 19:25:12 +0000
(14:25 -0500)
wayland/connection.c
patch
|
blob
|
history
diff --git
a/wayland/connection.c
b/wayland/connection.c
index
0705c19
..
73715e2
100644
(file)
--- a/
wayland/connection.c
+++ b/
wayland/connection.c
@@
-369,7
+369,7
@@
wl_connection_vmarshal(struct wl_connection *connection,
struct wl_array **arrayp, *array;
const char **sp, *s;
char *extra;
struct wl_array **arrayp, *array;
const char **sp, *s;
char *extra;
- int i, count, fd, extra_size;
+ int i, count, fd, extra_size
, *fd_ptr
;
extra_size = wl_message_size_extra(message);
count = strlen(message->signature) + 2;
extra_size = wl_message_size_extra(message);
count = strlen(message->signature) + 2;
@@
-449,12
+449,18
@@
wl_connection_vmarshal(struct wl_connection *connection,
break;
case 'h':
break;
case 'h':
+ closure->types[i] = &ffi_type_sint;
+ closure->args[i] = extra;
+ fd_ptr = (int *) extra;
+ extra += sizeof *fd_ptr;
+
fd = va_arg(ap, int);
dup_fd = dup(fd);
if (dup_fd < 0) {
fprintf(stderr, "dup failed: %m");
abort();
}
fd = va_arg(ap, int);
dup_fd = dup(fd);
if (dup_fd < 0) {
fprintf(stderr, "dup failed: %m");
abort();
}
+ *fd_ptr = dup_fd;
wl_buffer_put(&connection->fds_out,
&dup_fd, sizeof dup_fd);
break;
wl_buffer_put(&connection->fds_out,
&dup_fd, sizeof dup_fd);
break;