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

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

revision 176 by n-ki, Tue Sep 17 09:55:03 2002 UTC revision 260 by astrand, Mon Nov 18 15:31:19 2002 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Protocol services - RDP layer     Protocol services - RDP layer
4     Copyright (C) Matthew Chapman 1999-2001     Copyright (C) Matthew Chapman 1999-2002
5        
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 196  rdp_send_control(uint16 action) Line 196  rdp_send_control(uint16 action)
196    
197  /* Send a synchronisation PDU */  /* Send a synchronisation PDU */
198  static void  static void
199  rdp_send_synchronise()  rdp_send_synchronise(void)
200  {  {
201          STREAM s;          STREAM s;
202    
# Line 434  rdp_out_unknown_caps(STREAM s) Line 434  rdp_out_unknown_caps(STREAM s)
434    
435  /* Send a confirm active PDU */  /* Send a confirm active PDU */
436  static void  static void
437  rdp_send_confirm_active()  rdp_send_confirm_active(void)
438  {  {
439          STREAM s;          STREAM s;
440          uint16 caplen =          uint16 caplen =
# Line 601  process_bitmap_updates(STREAM s) Line 601  process_bitmap_updates(STREAM s)
601  static void  static void
602  process_palette(STREAM s)  process_palette(STREAM s)
603  {  {
604          HCOLOURMAP hmap;          COLOURENTRY *entry;
605          COLOURMAP map;          COLOURMAP map;
606          uint8 *colours;          HCOLOURMAP hmap;
607            int i;
608    
609          in_uint8s(s, 2);        /* pad */          in_uint8s(s, 2);        /* pad */
610          in_uint16_le(s, map.ncolours);          in_uint16_le(s, map.ncolours);
611          in_uint8s(s, 2);        /* pad */          in_uint8s(s, 2);        /* pad */
612          in_uint8p(s, colours, (map.ncolours * 3));  
613          map.colours = (COLOURENTRY *) colours;          map.colours = xmalloc(3 * map.ncolours);
614    
615            for (i = 0; i < map.ncolours; i++)
616            {
617                    entry = &map.colours[i];
618                    in_uint8(s, entry->red);
619                    in_uint8(s, entry->green);
620                    in_uint8(s, entry->blue);
621            }
622    
623          hmap = ui_create_colourmap(&map);          hmap = ui_create_colourmap(&map);
624          ui_set_colourmap(hmap);          ui_set_colourmap(hmap);
625    
626            xfree(map.colours);
627  }  }
628    
629  /* Process an update PDU */  /* Process an update PDU */
# Line 681  process_data_pdu(STREAM s) Line 692  process_data_pdu(STREAM s)
692    
693  /* Process incoming packets */  /* Process incoming packets */
694  void  void
695  rdp_main_loop()  rdp_main_loop(void)
696  {  {
697          uint8 type;          uint8 type;
698          STREAM s;          STREAM s;
# Line 721  rdp_connect(char *server, uint32 flags, Line 732  rdp_connect(char *server, uint32 flags,
732    
733  /* Disconnect from the RDP layer */  /* Disconnect from the RDP layer */
734  void  void
735  rdp_disconnect()  rdp_disconnect(void)
736  {  {
737          sec_disconnect();          sec_disconnect();
738  }  }

Legend:
Removed from v.176  
changed lines
  Added in v.260

  ViewVC Help
Powered by ViewVC 1.1.26