/[rdesktop]/jpeg/rdesktop/trunk/printercache.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 /jpeg/rdesktop/trunk/printercache.c

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

revision 864 by stargo, Sun Mar 6 21:11:18 2005 UTC revision 865 by stargo, Tue Mar 15 11:25:50 2005 UTC
# Line 239  printercache_process(STREAM s) Line 239  printercache_process(STREAM s)
239          {          {
240                  case 4: /* rename item */                  case 4: /* rename item */
241                          in_uint8(s, printer_length);                          in_uint8(s, printer_length);
242                          in_uint8s(s, 0x3);      // padding                          in_uint8s(s, 0x3);      /* padding */
243                          in_uint8(s, driver_length);                          in_uint8(s, driver_length);
244                          in_uint8s(s, 0x3);      // padding                          in_uint8s(s, 0x3);      /* padding */
245    
246                          /* NOTE - 'driver' doesn't contain driver, it contains the new printer name */                          /* NOTE - 'driver' doesn't contain driver, it contains the new printer name */
247    
# Line 253  printercache_process(STREAM s) Line 253  printercache_process(STREAM s)
253    
254                  case 3: /* delete item */                  case 3: /* delete item */
255                          in_uint8(s, printer_unicode_length);                          in_uint8(s, printer_unicode_length);
256                          in_uint8s(s, 0x3);      // padding                          in_uint8s(s, 0x3);      /* padding */
257                          printer_length = rdp_in_unistr(s, printer, printer_unicode_length);                          printer_length = rdp_in_unistr(s, printer, printer_unicode_length);
258                          printercache_unlink_blob(printer);                          printercache_unlink_blob(printer);
259                          break;                          break;
# Line 270  printercache_process(STREAM s) Line 270  printercache_process(STREAM s)
270                          break;                          break;
271    
272                  case 1: /* save device data */                  case 1: /* save device data */
273                          in_uint8a(s, device_name, 5);   // get LPTx/COMx name                          in_uint8a(s, device_name, 5);   /* get LPTx/COMx name */
274    
275                          // need to fetch this data so that we can get the length of the packet to store.                          /* need to fetch this data so that we can get the length of the packet to store. */
276                          in_uint8s(s, 0x2);      // ???                          in_uint8s(s, 0x2);      /* ??? */
277                          in_uint8s(s, 0x2)       // pad??                          in_uint8s(s, 0x2)       /* pad?? */
278                                  in_uint32_be(s, driver_length);                                  in_uint32_be(s, driver_length);
279                          in_uint32_be(s, printer_length);                          in_uint32_be(s, printer_length);
280                          in_uint8s(s, 0x7)       // pad??                          in_uint8s(s, 0x7)       /* pad?? */
281                                  // next is driver in unicode                                  /* next is driver in unicode */
282                                  // next is printer in unicode                                  /* next is printer in unicode */
283                                  /* TODO: figure out how to use this information when reconnecting */                                  /* TODO: figure out how to use this information when reconnecting */
284                                  /* actually - all we need to store is the driver and printer */                                  /* actually - all we need to store is the driver and printer */
285                                  /* and figure out what the first word is. */                                  /* and figure out what the first word is. */
286                                  /* rewind stream so that we can save this blob   */                                  /* rewind stream so that we can save this blob   */
287                                  /* length is driver_length + printer_length + 19 */                                  /* length is driver_length + printer_length + 19 */
288                                  // rewind stream                                  /* rewind stream */
289                                  s->p = s->p - 19;                                  s->p = s->p - 19;
290    
291                          printercache_save_blob(device_name, s->p,                          printercache_save_blob(device_name, s->p,

Legend:
Removed from v.864  
changed lines
  Added in v.865

  ViewVC Help
Powered by ViewVC 1.1.26