GUACAMOLE-200: Kill any remaining print job when connection closes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/17093a81 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/17093a81 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/17093a81 Branch: refs/heads/master Commit: 17093a81491d871504d614bf211efe4346fbdeff Parents: d23a22b Author: Michael Jumper <mjum...@apache.org> Authored: Mon Feb 13 23:08:54 2017 -0800 Committer: Michael Jumper <mjum...@apache.org> Committed: Mon Feb 13 23:08:54 2017 -0800 ---------------------------------------------------------------------- src/protocols/rdp/guac_rdpdr/rdpdr_printer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/17093a81/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c ---------------------------------------------------------------------- diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c index cd7c517..0545f89 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c @@ -179,10 +179,12 @@ static void guac_rdpdr_device_printer_iorequest_handler(guac_rdpdr_device* devic static void guac_rdpdr_device_printer_free_handler(guac_rdpdr_device* device) { - /* Close print job if open */ + /* Terminate and free print job if open */ guac_rdpdr_print_job* job = (guac_rdpdr_print_job*) device->data; - if (job != NULL) + if (job != NULL) { + guac_rdpdr_print_job_kill(job); guac_rdpdr_print_job_free(job); + } }