/[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 687 by n-ki, Fri Apr 30 06:18:08 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 962  process_data_pdu(STREAM s, uint32 * ext_ Line 962  process_data_pdu(STREAM s, uint32 * ext_
962    
963          uint32 roff, rlen;          uint32 roff, rlen;
964    
965          struct stream *ns = &(mppc_dict.ns);          struct stream *ns = &(g_mppc_dict.ns);
         uint8 *dict = (mppc_dict.hist);  
966    
967          in_uint8s(s, 6);        /* shareid, pad, streamid */          in_uint8s(s, 6);        /* shareid, pad, streamid */
968          in_uint16(s, len);          in_uint16(s, len);
# Line 978  process_data_pdu(STREAM s, uint32 * ext_ Line 977  process_data_pdu(STREAM s, uint32 * ext_
977                  if (mppc_expand(s->p, clen, ctype, &roff, &rlen) == -1)                  if (mppc_expand(s->p, clen, ctype, &roff, &rlen) == -1)
978                          error("error while decompressing packet\n");                          error("error while decompressing packet\n");
979    
980                  len -= 18;                  //len -= 18;
   
                 /* this should never happen */  
                 if (len != rlen)  
                         error("decompression error len != rlen\n");  
981    
982                  /* allocate memory and copy the uncompressed data into the temporary stream */                  /* allocate memory and copy the uncompressed data into the temporary stream */
983                  ns->data = xrealloc(ns->data, len);                  ns->data = xrealloc(ns->data, rlen);
984    
985                  memcpy((ns->data), (unsigned char *) (mppc_dict.hist + roff), len);                  memcpy((ns->data), (unsigned char *) (g_mppc_dict.hist + roff), rlen);
986    
987                  ns->size = len;                  ns->size = rlen;
988                  ns->end = (ns->data + ns->size);                  ns->end = (ns->data + ns->size);
989                  ns->p = ns->data;                  ns->p = ns->data;
990                  ns->rdp_hdr = ns->p;                  ns->rdp_hdr = ns->p;

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

  ViewVC Help
Powered by ViewVC 1.1.26