summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus.fritzsch@xse.de>2014-08-05 16:09:03 +0200
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-09-01 15:55:44 +0900
commite442e7bc385f3ded809b76e111b402034bb36e42 (patch)
tree4534f24a63c2641c96d9d2b93725083bb89af233
parentf0a71fe286d2e605f84c778520228d83e1405db4 (diff)
downloadwayland-ivi-extension-e442e7bc385f3ded809b76e111b402034bb36e42.tar.gz
ilmControl: check roundtrip results on init
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
index 30b06e6..73568d7 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -1201,12 +1201,17 @@ init_control(void)
return -1;
}
- // first level objects; ivi_controller
- display_roundtrip_queue(wl->display, wl->queue);
- // second level object: ivi_controller_surfaces/layers
- display_roundtrip_queue(wl->display, wl->queue);
- // third level objects: ivi_controller_surfaces/layers properties
- display_roundtrip_queue(wl->display, wl->queue);
+ if (
+ // first level objects; ivi_controller
+ display_roundtrip_queue(wl->display, wl->queue) == -1 ||
+ // second level object: ivi_controller_surfaces/layers
+ display_roundtrip_queue(wl->display, wl->queue) == -1 ||
+ // third level objects: ivi_controller_surfaces/layers properties
+ display_roundtrip_queue(wl->display, wl->queue) == -1)
+ {
+ fprintf(stderr, "Failed to initialize wayland connection: %s\n", strerror(errno));
+ return -1;
+ }
if (! wl->controller)
{