From b863fb1b9d486867ab1fc5e0f62fb42321080b5a Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 2 Sep 2012 19:02:42 +0200 Subject: [PATCH] sr: session_driver: Remove source on completion Remove the session source once we are done loading the file, otherwise we'll spin forever in sr_session_run. Reported-by: Joel Holdsworth Signed-off-by: Lars-Peter Clausen --- session_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/session_driver.c b/session_driver.c index 9f87c8e0..6ba80428 100644 --- a/session_driver.c +++ b/session_driver.c @@ -98,6 +98,7 @@ static int receive_data(int fd, int revents, void *cb_data) if (!got_data) { packet.type = SR_DF_END; sr_session_send(cb_data, &packet); + sr_session_source_remove(-1); } return TRUE; @@ -121,8 +122,6 @@ static int hw_cleanup(void) g_slist_free(dev_insts); dev_insts = NULL; - sr_session_source_remove(-1); - return SR_OK; }