/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpdr.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/rdpdr.c

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

revision 627 by n-ki, Thu Mar 4 08:24:40 2004 UTC revision 647 by astrand, Mon Apr 5 19:23:08 2004 UTC
# Line 39  uint32 g_num_devices; Line 39  uint32 g_num_devices;
39    
40  /* Table with information about rdpdr devices */  /* Table with information about rdpdr devices */
41  RDPDR_DEVICE g_rdpdr_device[RDPDR_MAX_DEVICES];  RDPDR_DEVICE g_rdpdr_device[RDPDR_MAX_DEVICES];
42    char * g_rdpdr_clientname = NULL;
43    
44  /* Used to store incoming io request, until they are ready to be completed */  /* Used to store incoming io request, until they are ready to be completed */
45  /* using a linked list ensures that they are processed in the right order, */  /* using a linked list ensures that they are processed in the right order, */
# Line 168  void Line 169  void
169  rdpdr_send_name(void)  rdpdr_send_name(void)
170  {  {
171          uint8 magic[4] = "rDNC";          uint8 magic[4] = "rDNC";
         uint32 hostlen = (strlen(hostname) + 1) * 2;  
172          STREAM s;          STREAM s;
173            uint32 hostlen;
174    
175            if (NULL == g_rdpdr_clientname) {
176              g_rdpdr_clientname = hostname;
177            }
178            hostlen = (strlen(g_rdpdr_clientname) + 1) * 2;
179    
180          s = channel_init(rdpdr_channel, 16 + hostlen);          s = channel_init(rdpdr_channel, 16 + hostlen);
181          out_uint8a(s, magic, 4);          out_uint8a(s, magic, 4);
# Line 177  rdpdr_send_name(void) Line 183  rdpdr_send_name(void)
183          out_uint16_le(s, 0x72);          out_uint16_le(s, 0x72);
184          out_uint32(s, 0);          out_uint32(s, 0);
185          out_uint32_le(s, hostlen);          out_uint32_le(s, hostlen);
186          rdp_out_unistr(s, hostname, hostlen - 2);          rdp_out_unistr(s, g_rdpdr_clientname, hostlen - 2);
187          s_mark_end(s);          s_mark_end(s);
188          channel_send(s, rdpdr_channel);          channel_send(s, rdpdr_channel);
189  }  }

Legend:
Removed from v.627  
changed lines
  Added in v.647

  ViewVC Help
Powered by ViewVC 1.1.26