/[rdesktop]/sourceforge.net/trunk/rdesktop/channels.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/channels.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 446 by matthewc, Mon Aug 18 04:52:51 2003 UTC revision 473 by forsberg, Sat Sep 27 12:14:25 2003 UTC
# Line 87  channel_send(STREAM s, VCHANNEL * channe Line 87  channel_send(STREAM s, VCHANNEL * channe
87          s_pop_layer(s, channel_hdr);          s_pop_layer(s, channel_hdr);
88          length = s->end - s->p - 8;          length = s->end - s->p - 8;
89    
90          thislength = MIN(length, CHANNEL_CHUNK_LENGTH);          DEBUG_CLIPBOARD(("channel_send, length = %d\n", length));
91    
92            thislength = MIN(length, CHANNEL_CHUNK_LENGTH);  
93    /* Note: In the original clipboard implementation, this number was
94       1592, not 1600. However, I don't remember the reason and 1600 seems
95       to work so.. This applies only to *this* length, not the length of
96       continuation or ending packets. */
97          remaining = length - thislength;          remaining = length - thislength;
98          flags = (remaining == 0) ? CHANNEL_FLAG_FIRST | CHANNEL_FLAG_LAST : CHANNEL_FLAG_FIRST;          flags = (remaining == 0) ? CHANNEL_FLAG_FIRST | CHANNEL_FLAG_LAST : CHANNEL_FLAG_FIRST;
99          if (channel->flags & CHANNEL_OPTION_SHOW_PROTOCOL)          if (channel->flags & CHANNEL_OPTION_SHOW_PROTOCOL)
# Line 96  channel_send(STREAM s, VCHANNEL * channe Line 102  channel_send(STREAM s, VCHANNEL * channe
102          out_uint32_le(s, length);          out_uint32_le(s, length);
103          out_uint32_le(s, flags);          out_uint32_le(s, flags);
104          data = s->end = s->p + thislength;          data = s->end = s->p + thislength;
105            DEBUG_CLIPBOARD(("Sending %d bytes with FLAG_FIRST\n", thislength));
106          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);
107    
108          /* subsequent segments copied (otherwise would have to generate headers backwards) */          /* subsequent segments copied (otherwise would have to generate headers backwards) */
# Line 104  channel_send(STREAM s, VCHANNEL * channe Line 111  channel_send(STREAM s, VCHANNEL * channe
111                  thislength = MIN(remaining, CHANNEL_CHUNK_LENGTH);                  thislength = MIN(remaining, CHANNEL_CHUNK_LENGTH);
112                  remaining -= thislength;                  remaining -= thislength;
113                  flags = (remaining == 0) ? CHANNEL_FLAG_LAST : 0;                  flags = (remaining == 0) ? CHANNEL_FLAG_LAST : 0;
114                    if (channel->flags & CHANNEL_OPTION_SHOW_PROTOCOL)
115                            flags |= CHANNEL_FLAG_SHOW_PROTOCOL;
116    
117                    DEBUG_CLIPBOARD(("Sending %d bytes with flags %d\n", thislength, flags));
118    
119                  s = sec_init(g_encryption ? SEC_ENCRYPT : 0, thislength + 8);                  s = sec_init(g_encryption ? SEC_ENCRYPT : 0, thislength + 8);
120                  out_uint32_le(s, length);                  out_uint32_le(s, length);

Legend:
Removed from v.446  
changed lines
  Added in v.473

  ViewVC Help
Powered by ViewVC 1.1.26