From 54167ec3fad033b1db0366a9c1f9f217b04c60fa Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 29 Mar 2019 11:07:21 +0100 Subject: [PATCH] broadway: Add warning for unexpected roundtrip delays --- gdk/broadway/broadway-server.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index dc6f965db0..d52decbeab 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -703,12 +703,19 @@ parse_input_message (BroadwayInput *input, const unsigned char *message) if (rt->id == msg.roundtrip_notify.id && rt->tag == msg.roundtrip_notify.tag) - { - server->outstanding_roundtrips = g_list_delete_link (server->outstanding_roundtrips, l); - g_free (rt); - break; - } + break; } + + if (l == NULL) + g_warning ("Got unexpected rountrip reply for id %d, tag %d\n", msg.roundtrip_notify.id, msg.roundtrip_notify.tag); + else + { + BroadwayOutstandingRoundtrip *rt = l->data; + + server->outstanding_roundtrips = g_list_delete_link (server->outstanding_roundtrips, l); + g_free (rt); + } + break; case BROADWAY_EVENT_SCREEN_SIZE_CHANGED: