/[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 437 by jsorg71, Mon Jul 28 21:41:12 2003 UTC revision 446 by matthewc, Mon Aug 18 04:52:51 2003 UTC
# Line 27  Line 27 
27  #define CHANNEL_FLAG_LAST               0x02  #define CHANNEL_FLAG_LAST               0x02
28  #define CHANNEL_FLAG_SHOW_PROTOCOL      0x10  #define CHANNEL_FLAG_SHOW_PROTOCOL      0x10
29    
30  extern BOOL use_rdp5;  extern BOOL g_use_rdp5;
31  extern BOOL g_encryption;  extern BOOL g_encryption;
32    
33  VCHANNEL g_channels[MAX_CHANNELS];  VCHANNEL g_channels[MAX_CHANNELS];
34  unsigned int g_num_channels;  unsigned int g_num_channels;
35    
36  /* FIXME: We should use the information in TAG_SRV_CHANNELS to map RDP5  /* FIXME: We should use the information in TAG_SRV_CHANNELS to map RDP5
37     channels to MCS channels.     channels to MCS channels.
38    
39     The format of TAG_SRV_CHANNELS seems to be     The format of TAG_SRV_CHANNELS seems to be
40    
# Line 48  channel_register(char *name, uint32 flag Line 48  channel_register(char *name, uint32 flag
48  {  {
49          VCHANNEL *channel;          VCHANNEL *channel;
50    
51          if (!use_rdp5)          if (!g_use_rdp5)
52                  return NULL;                  return NULL;
53    
54          if (g_num_channels >= MAX_CHANNELS)          if (g_num_channels >= MAX_CHANNELS)
# Line 156  channel_process(STREAM s, uint16 mcs_cha Line 156  channel_process(STREAM s, uint16 mcs_cha
156                          in->p = in->data;                          in->p = in->data;
157                  }                  }
158    
159                  thislength = s->end - s->p;                  thislength = MIN(s->end - s->p, in->data + in->size - in->p);
160                  memcpy(in->p, s->p, thislength);                  memcpy(in->p, s->p, thislength);
161                  s->p += thislength;                  in->p += thislength;
                 s->end += thislength;  
162    
163                  if (flags & CHANNEL_FLAG_LAST)                  if (flags & CHANNEL_FLAG_LAST)
164                  {                  {
165                            in->end = in->p;
166                          in->p = in->data;                          in->p = in->data;
167                          channel->process(in);                          channel->process(in);
168                  }                  }

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

  ViewVC Help
Powered by ViewVC 1.1.26