]> git.sesse.net Git - rdpsrv/blobdiff - channels.c
Separated the RDP5 sending into its own protocol layer.
[rdpsrv] / channels.c
index 6fc0cde9c82f47b35c66d342fc84144209ebb1bc..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;
        }
@@ -133,6 +133,8 @@ channel_process(STREAM s, uint16 mcs_channel)
        unsigned int i;
        STREAM in;
 
+       printf("message on channel %u\n", mcs_channel);
+       
        for (i = 0; i < g_num_channels; i++)
        {
                channel = &g_channels[i];