]> git.sesse.net Git - rdpsrv/blobdiff - channels.c
Separated the RDP5 sending into its own protocol layer.
[rdpsrv] / channels.c
index ba3248cc7a6406cf8fdba78d9d6e8f2d75d6f821..b14f82ac139a7dbe774570fe822a23854a10745d 100644 (file)
@@ -68,7 +68,7 @@ channel_init(VCHANNEL * channel, uint32 length)
 {
        STREAM s;
 
-       s = sec_init(/*g_encryption ? SEC_ENCRYPT :*/ 0, length + 8);
+       s = sec_init(g_encryption ? SEC_ENCRYPT : 0, length + 8);
        s_push_layer(s, channel_hdr, 8);
        return s;
 }
@@ -100,7 +100,7 @@ channel_send(STREAM s, VCHANNEL * channel)
        out_uint32_le(s, flags);
        data = s->end = s->p + thislength;
        DEBUG_CLIPBOARD(("Sending %d bytes with FLAG_FIRST\n", thislength));
-       sec_send_to_channel(s, /*g_encryption ? SEC_ENCRYPT :*/ 0, channel->mcs_id);
+       sec_send_to_channel(s, g_encryption ? SEC_ENCRYPT : 0, channel->mcs_id);
 
        /* subsequent segments copied (otherwise would have to generate headers backwards) */
        while (remaining > 0)
@@ -113,12 +113,12 @@ channel_send(STREAM s, VCHANNEL * channel)
 
                DEBUG_CLIPBOARD(("Sending %d bytes with flags %d\n", thislength, flags));
 
-               s = sec_init(/*g_encryption ? SEC_ENCRYPT : */0, thislength + 8);
+               s = sec_init(g_encryption ? SEC_ENCRYPT : 0, thislength + 8);
                out_uint32_le(s, length);
                out_uint32_le(s, flags);
                out_uint8p(s, data, thislength);
                s_mark_end(s);
-               sec_send_to_channel(s, /*g_encryption ? SEC_ENCRYPT : */0, channel->mcs_id);
+               sec_send_to_channel(s, g_encryption ? SEC_ENCRYPT : 0, channel->mcs_id);
 
                data += thislength;
        }