From dc0beb3233631ebbee7f8830e5f2d93f872c3cd8 Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 23 Nov 2015 18:05:19 -0500 Subject: [PATCH] OXT-439: fix the broken logic Signed-off-by: Jed --- src/rpc.c | 4 ++-- src/usbmanager.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc.c b/src/rpc.c index 32ff943..14c6873 100644 --- a/src/rpc.c +++ b/src/rpc.c @@ -251,7 +251,7 @@ gboolean ctxusb_daemon_get_device_info(CtxusbDaemonObject *this, char *uuid = policy_get_sticky_uuid(IN_dev_id); if (uuid != NULL) { /* But it has an always-assign VM */ - if (device->type | OPTICAL) + if (device->type & OPTICAL) /* It's a CD drive */ *OUT_state = DEV_STATE_CD_ALWAYS; else { @@ -266,7 +266,7 @@ gboolean ctxusb_daemon_get_device_info(CtxusbDaemonObject *this, *OUT_vm_assigned = g_strdup(uuid); } else { /* It doesn't have an always-assign VM, it's all free */ - if (device->type | OPTICAL) + if (device->type & OPTICAL) /* Unless it's a CD drive */ *OUT_state = DEV_STATE_CD_DOM0; else diff --git a/src/usbmanager.c b/src/usbmanager.c index 6f38a1c..388d7e7 100644 --- a/src/usbmanager.c +++ b/src/usbmanager.c @@ -39,7 +39,7 @@ */ void usbmanager_device_added(device_t *device) { - if (device->type | OPTICAL) + if (device->type & OPTICAL) notify_com_citrix_xenclient_usbdaemon_optical_device_detected(g_xcbus, USBDAEMON, USBDAEMON_OBJ);