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 <joel@airwebreathe.org.uk> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
40578aa487
commit
b863fb1b9d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue