From 647850c8ce54fadf0908391fd8879dd7780a58b0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 10 Dec 2013 23:12:01 -0800 Subject: [PATCH] Tighten scope, fix initialization. --- src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c index 4a053844..3beb377e 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c @@ -238,9 +238,6 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device, if (file->bytes_written > 0 && strncmp(file->absolute_path, "\\Download\\", 10) == 0) { - int i; - char c; - /* Get client and stream */ guac_client* client = device->rdpdr->client; @@ -254,6 +251,9 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device, guac_rdp_download_status* status; char* basename; + int i; + char c; + /* Associate stream with transfer status */ guac_stream* stream = guac_client_alloc_stream(client); stream->data = status = malloc(sizeof(guac_rdp_download_status)); @@ -264,6 +264,7 @@ void guac_rdpdr_fs_process_close(guac_rdpdr_device* device, guac_rdp_fs_delete((guac_rdp_fs*) device->data, file_id); /* Get basename from absolute path */ + i=0; basename = file->absolute_path; do {