GUACAMOLE-200: Move print job cleanup into main RDP client thread.

This commit is contained in:
Michael Jumper 2017-02-14 00:09:24 -08:00
parent 5a68f932d6
commit bf2a5885d0
2 changed files with 7 additions and 7 deletions

View File

@ -24,7 +24,6 @@
#include "rdp.h"
#include "rdp_disp.h"
#include "rdp_fs.h"
#include "rdp_print_job.h"
#include "user.h"
#ifdef ENABLE_COMMON_SSH
@ -107,12 +106,6 @@ int guac_rdp_client_free_handler(guac_client* client) {
if (rdp_client->filesystem != NULL)
guac_rdp_fs_free(rdp_client->filesystem);
/* Clean up print job, if active */
if (rdp_client->active_job != NULL) {
guac_rdp_print_job_kill(rdp_client->active_job);
guac_rdp_print_job_free(rdp_client->active_job);
}
#ifdef ENABLE_COMMON_SSH
/* Free SFTP filesystem, if loaded */
if (rdp_client->sftp_filesystem)

View File

@ -31,6 +31,7 @@
#include "rdp_cliprdr.h"
#include "rdp_disp.h"
#include "rdp_fs.h"
#include "rdp_print_job.h"
#include "rdp_gdi.h"
#include "rdp_glyph.h"
#include "rdp_pointer.h"
@ -853,6 +854,12 @@ static int guac_rdp_handle_connection(guac_client* client) {
}
/* Clean up print job, if active */
if (rdp_client->active_job != NULL) {
guac_rdp_print_job_kill(rdp_client->active_job);
guac_rdp_print_job_free(rdp_client->active_job);
}
pthread_mutex_lock(&(rdp_client->rdp_lock));
/* Disconnect client and channels */