[PATCH] Reverses the order of a socket creation in weston/compositor.c
Igor Makarov
igor.makarov at lge.com
Wed Feb 29 01:22:23 PST 2012
Hello all,
So, when I trying to start weston with 'wayland-backend.so' on ARM
device I got errors related to socket connection.
This error appear because 'backed_init' start client-socket connection
to server-socket that is absent at that moment. This patch reverses the
order of a socket creation.
---
src/compositor.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 74c40da..80cbcf9 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2493,6 +2493,11 @@ int main(int argc, char *argv[])
if (!shell_init)
exit(EXIT_FAILURE);
+ if (wl_display_add_socket(display, option_socket_name)) {
+ fprintf(stderr, "failed to add socket: %m\n");
+ exit(EXIT_FAILURE);
+ }
+
ec = backend_init(display, backend_options);
if (ec == NULL) {
fprintf(stderr, "failed to create compositor\n");
@@ -2508,11 +2513,6 @@ int main(int argc, char *argv[])
if (shell_init(ec) < 0)
exit(EXIT_FAILURE);
- if (wl_display_add_socket(display, option_socket_name)) {
- fprintf(stderr, "failed to add socket: %m\n");
- exit(EXIT_FAILURE);
- }
-
weston_compositor_wake(ec);
if (setjmp(segv_jmp_buf) == 0)
wl_display_run(display);
--
1.7.4.1
--
Igor Makarov
igor.makarov at lge.com
Research Engineer
LG Electronics, Russia R&D Lab
More information about the wayland-devel
mailing list