channels/smartcard: fix crash and get rid of svc_plugin usage

This commit is contained in:
Marc-André Moreau 2013-10-24 15:12:11 -04:00
parent deff2217b8
commit 50e8c713a0
2 changed files with 4 additions and 6 deletions

View File

@ -31,7 +31,6 @@
#include <freerdp/utils/list.h> #include <freerdp/utils/list.h>
#include <freerdp/utils/debug.h> #include <freerdp/utils/debug.h>
#include <freerdp/utils/svc_plugin.h>
#include <freerdp/channels/rdpdr.h> #include <freerdp/channels/rdpdr.h>
@ -229,7 +228,7 @@ static void smartcard_irp_complete(IRP* irp)
* to be in this file so that "smartcard_irp_request()" can reference it. * to be in this file so that "smartcard_irp_request()" can reference it.
*/ */
DEBUG_SVC("DeviceId %d FileId %d CompletionId %d", irp->device->id, irp->FileId, irp->CompletionId); DEBUG_SCARD("DeviceId %d FileId %d CompletionId %d", irp->device->id, irp->FileId, irp->CompletionId);
pos = Stream_GetPosition(irp->output); pos = Stream_GetPosition(irp->output);
Stream_SetPosition(irp->output, 12); Stream_SetPosition(irp->output, 12);
@ -246,8 +245,7 @@ static void smartcard_irp_complete(IRP* irp)
if (!duplicate) if (!duplicate)
{ {
svc_plugin_send(irp->devman->plugin, irp->output); irp->Complete(irp);
irp->output = NULL;
} }
/* End TS Client defect workaround. */ /* End TS Client defect workaround. */
@ -315,7 +313,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
{ {
char* name; char* name;
char* path; char* path;
int i, length, ck; int length, ck;
RDPDR_SMARTCARD* device; RDPDR_SMARTCARD* device;
SMARTCARD_DEVICE* smartcard; SMARTCARD_DEVICE* smartcard;
@ -339,6 +337,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
smartcard->name = NULL; smartcard->name = NULL;
smartcard->path = NULL; smartcard->path = NULL;
if (path) if (path)
{ {
smartcard->path = path; smartcard->path = path;

View File

@ -41,7 +41,6 @@
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
#include <freerdp/channels/rdpdr.h> #include <freerdp/channels/rdpdr.h>
#include <freerdp/utils/svc_plugin.h>
#include "smartcard_main.h" #include "smartcard_main.h"