Skip to content

Commit

Permalink
Merge pull request #7 from jean-edouard/ahem
Browse files Browse the repository at this point in the history
OXT-439: fix the broken logic
  • Loading branch information
rossphilipson committed Nov 24, 2015
2 parents 54b9a9b + dc0beb3 commit 692e5b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/usbmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 692e5b7

Please sign in to comment.