/[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 886 by stargo, Sat Apr 16 11:42:34 2005 UTC revision 945 by astrand, Tue Aug 2 09:29:41 2005 UTC
# Line 49  extern int g_width; Line 49  extern int g_width;
49  extern int g_height;  extern int g_height;
50  extern BOOL g_bitmap_cache;  extern BOOL g_bitmap_cache;
51  extern BOOL g_bitmap_cache_persist_enable;  extern BOOL g_bitmap_cache_persist_enable;
 extern BOOL g_rdp_compression;  
52    
53  uint8 *g_next_packet;  uint8 *g_next_packet;
54  uint32 g_rdp_shareid;  uint32 g_rdp_shareid;
# Line 298  rdp_send_logon_info(uint32 flags, char * Line 297  rdp_send_logon_info(uint32 flags, char *
297          time_t t = time(NULL);          time_t t = time(NULL);
298          time_t tzone;          time_t tzone;
299    
 #if 0  
         /* enable rdp compression */  
         /* some problems still exist with rdp5 */  
         flags |= RDP_COMPRESSION;  
 #endif  
   
300          if (!g_use_rdp5 || 1 == g_server_rdp_version)          if (!g_use_rdp5 || 1 == g_server_rdp_version)
301          {          {
302                  DEBUG_RDP5(("Sending RDP4-style Logon packet\n"));                  DEBUG_RDP5(("Sending RDP4-style Logon packet\n"));
# Line 488  rdp_send_input(uint32 time, uint16 messa Line 481  rdp_send_input(uint32 time, uint16 messa
481          rdp_send_data(s, RDP_DATA_PDU_INPUT);          rdp_send_data(s, RDP_DATA_PDU_INPUT);
482  }  }
483    
484  /* Inform the server on the contents of the persistent bitmap cache */  /* Send a client window information PDU */
485    void
486    rdp_send_client_window_status(int status)
487    {
488            STREAM s;
489            static int current_status = 1;
490    
491            if (current_status == status)
492                    return;
493    
494            s = rdp_init_data(12);
495    
496            out_uint32_le(s, status);
497    
498            switch (status)
499            {
500                    case 0: /* shut the server up */
501                            break;
502    
503                    case 1: /* receive data again */
504                            out_uint32_le(s, 0);    /* unknown */
505                            out_uint16_le(s, g_width);
506                            out_uint16_le(s, g_height);
507                            break;
508            }
509    
510            s_mark_end(s);
511            rdp_send_data(s, RDP_DATA_PDU_CLIENT_WINDOW_STATUS);
512            current_status = status;
513    }
514    
515    /* Send persistent bitmap cache enumeration PDU's */
516  static void  static void
517  rdp_enum_bmpcache2(void)  rdp_enum_bmpcache2(void)
518  {  {
# Line 660  rdp_out_bmpcache_caps(STREAM s) Line 684  rdp_out_bmpcache_caps(STREAM s)
684  static void  static void
685  rdp_out_bmpcache2_caps(STREAM s)  rdp_out_bmpcache2_caps(STREAM s)
686  {  {
         uint16 cellsize;  
   
687          out_uint16_le(s, RDP_CAPSET_BMPCACHE2);          out_uint16_le(s, RDP_CAPSET_BMPCACHE2);
688          out_uint16_le(s, RDP_CAPLEN_BMPCACHE2);          out_uint16_le(s, RDP_CAPLEN_BMPCACHE2);
689    
690          out_uint16_le(s, g_bitmap_cache_persist_enable ? 2 : 0);        /* version */          out_uint16_le(s, g_bitmap_cache_persist_enable ? 2 : 0);        /* version */
691    
692          /* Cellsize:          out_uint16_be(s, 3);    /* number of caches in this set */
            01 = 16x16, 02 = 32x32, 03 = 64x64  
            log2(cell size) - 3  
          */  
   
         cellsize = 0x03;  
   
         if (g_rdp_compression)  
         {  
                 switch (g_server_bpp)  
                 {  
                         case 24:  
                         case 16:  
                         case 15:  
                                 cellsize = 0x02;  
                                 break;  
                 }  
         }  
   
         out_uint16_le(s, (0x0000 | (cellsize << 8)));   /* flags? number of caches? */  
693    
694            /* max cell size for cache 0 is 16x16, 1 = 32x32, 2 = 64x64, etc */
695          out_uint32_le(s, BMPCACHE2_C0_CELLS);          out_uint32_le(s, BMPCACHE2_C0_CELLS);
696          out_uint32_le(s, BMPCACHE2_C1_CELLS);          out_uint32_le(s, BMPCACHE2_C1_CELLS);
697          if (pstcache_init(2))          if (pstcache_init(2))
# Line 893  rdp_process_bitmap_caps(STREAM s) Line 897  rdp_process_bitmap_caps(STREAM s)
897  }  }
898    
899  /* Process server capabilities */  /* Process server capabilities */
900  void  static void
901  rdp_process_server_caps(STREAM s, uint16 length)  rdp_process_server_caps(STREAM s, uint16 length)
902  {  {
903          int n;          int n;

Legend:
Removed from v.886  
changed lines
  Added in v.945

  ViewVC Help
Powered by ViewVC 1.1.26