/[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 683 by n-ki, Tue Apr 27 12:55:33 2004 UTC revision 708 by jsorg71, Fri Jun 4 15:01:36 2004 UTC
# Line 38  extern BOOL g_bitmap_cache; Line 38  extern BOOL g_bitmap_cache;
38  uint8 *g_next_packet;  uint8 *g_next_packet;
39  uint32 g_rdp_shareid;  uint32 g_rdp_shareid;
40    
41  extern RDPCOMP mppc_dict;  extern RDPCOMP g_mppc_dict;
42    
43  #if WITH_DEBUG  #if WITH_DEBUG
44  static uint32 g_packetno;  static uint32 g_packetno;
# Line 176  rdp_send_logon_info(uint32 flags, char * Line 176  rdp_send_logon_info(uint32 flags, char *
176          time_t t = time(NULL);          time_t t = time(NULL);
177          time_t tzone;          time_t tzone;
178    
179    #if 0
180            /* enable rdp compression */
181            /* some problems still exist with rdp5 */
182            flags |= RDP_COMPRESSION;
183    #endif
184    
185          if (!g_use_rdp5 || 1 == g_server_rdp_version)          if (!g_use_rdp5 || 1 == g_server_rdp_version)
186          {          {
187                  DEBUG_RDP5(("Sending RDP4-style Logon packet\n"));                  DEBUG_RDP5(("Sending RDP4-style Logon packet\n"));
188    
 #if 0  
                 /* enable rdp compression */  
                 /* decompression also works with rdp5 */  
                 /* but there are some unknown opcodes */  
                 flags |= RDP_COMPRESSION;  
 #endif  
189                  s = sec_init(sec_flags, 18 + len_domain + len_user + len_password                  s = sec_init(sec_flags, 18 + len_domain + len_user + len_password
190                               + len_program + len_directory + 10);                               + len_program + len_directory + 10);
191    
# Line 651  rdp_process_bitmap_caps(STREAM s) Line 651  rdp_process_bitmap_caps(STREAM s)
651           * The server may limit bpp and change the size of the desktop (for           * The server may limit bpp and change the size of the desktop (for
652           * example when shadowing another session).           * example when shadowing another session).
653           */           */
654          g_server_bpp = bpp;          if (g_server_bpp != bpp)
655          g_width = width;          {
656          g_height = height;                  warning("colour depth changed from %d to %d\n", g_server_bpp, bpp);
657                    g_server_bpp = bpp;
658          ui_resize_window();          }
659            if (g_width != width || g_height != height)
660            {
661                    warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
662                                    width, height);
663                    g_width = width;
664                    g_height = height;
665                    ui_resize_window();
666            }
667  }  }
668    
669  /* Respond to a demand active PDU */  /* Respond to a demand active PDU */
# Line 962  process_data_pdu(STREAM s, uint32 * ext_ Line 970  process_data_pdu(STREAM s, uint32 * ext_
970    
971          uint32 roff, rlen;          uint32 roff, rlen;
972    
973          struct stream *ns = &(mppc_dict.ns);          struct stream *ns = &(g_mppc_dict.ns);
         uint8 *dict = (mppc_dict.hist);  
974    
975          in_uint8s(s, 6);        /* shareid, pad, streamid */          in_uint8s(s, 6);        /* shareid, pad, streamid */
976          in_uint16(s, len);          in_uint16(s, len);
# Line 978  process_data_pdu(STREAM s, uint32 * ext_ Line 985  process_data_pdu(STREAM s, uint32 * ext_
985                  if (mppc_expand(s->p, clen, ctype, &roff, &rlen) == -1)                  if (mppc_expand(s->p, clen, ctype, &roff, &rlen) == -1)
986                          error("error while decompressing packet\n");                          error("error while decompressing packet\n");
987    
988                  len -= 18;                  //len -= 18;
   
                 /* this should never happen */  
                 if (len != rlen)  
                         error("decompression error len != rlen\n");  
989    
990                  /* allocate memory and copy the uncompressed data into the temporary stream */                  /* allocate memory and copy the uncompressed data into the temporary stream */
991                  ns->data = xrealloc(ns->data, len);                  ns->data = xrealloc(ns->data, rlen);
992    
993                  memcpy((ns->data), (unsigned char *) (mppc_dict.hist + roff), len);                  memcpy((ns->data), (unsigned char *) (g_mppc_dict.hist + roff), rlen);
994    
995                  ns->size = len;                  ns->size = rlen;
996                  ns->end = (ns->data + ns->size);                  ns->end = (ns->data + ns->size);
997                  ns->p = ns->data;                  ns->p = ns->data;
998                  ns->rdp_hdr = ns->p;                  ns->rdp_hdr = ns->p;

Legend:
Removed from v.683  
changed lines
  Added in v.708

  ViewVC Help
Powered by ViewVC 1.1.26