X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=rdpsrv.c;h=91989872cf530955bd5cd274a21f858e9d09818a;hp=94f20994376dfbb9b81588ed1809229189b1a9b6;hb=7ca0c329125614fd191db809987a364a7538bcaa;hpb=f6cb05500f5c71cbb069daeb26edd5879fd17a99 diff --git a/rdpsrv.c b/rdpsrv.c index 94f2099..9198987 100644 --- a/rdpsrv.c +++ b/rdpsrv.c @@ -140,6 +140,8 @@ void handle_input_pdu(STREAM s, int vnc_sock) mouse1_down = (device_flags & MOUSE_FLAG_DOWN) ? 0x01 : 0; if (device_flags & MOUSE_FLAG_BUTTON2) mouse2_down = (device_flags & MOUSE_FLAG_DOWN) ? 0x02 : 0; + + printf("button mask = %x\n", mouse1_down | mouse2_down); buf[0] = 5; // message type buf[1] = mouse1_down | mouse2_down; // button mask @@ -387,7 +389,7 @@ int serve_client() error("short read on vnc_sock\n"); if (read(vnc_sock, buf, 4) != 4) error("short read on vnc_sock\n"); - if (read(vnc_sock, (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3], 4) != 4) + if (read(vnc_sock, buf, (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]) != 4) error("short read on vnc_sock\n"); default: