reply.c: Fix bugs where debug statements were accessing the fd_ptr struct
authorJeremy Allison <jra@samba.org>
Thu, 16 Apr 1998 19:23:10 +0000 (19:23 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 16 Apr 1998 19:23:10 +0000 (19:23 +0000)
internals after Andrews' code had memset it to zero (this was causing core
dumps).
charcnv.c: Fixes for ISO8859-2 from Petr Hubeny <psh@capitol.cz>.
Jeremy.
(This used to be commit df8783ca76d543d200c743f515a185cfea2880df)

source3/lib/charcnv.c
source3/smbd/reply.c

index 42be32ccb39e05d95b8ce897dd857219f4ed8ea6..b016a07fd73efe688ae25284f5e3b7fd0a300b6c 100644 (file)
@@ -94,24 +94,24 @@ static void init_iso8859_2(void) {
     }
 
 /*
- * Tranlation table created by dan@feld.cvut.cz
+ * Tranlation table created by Petr Hubeny <psh@capitol.cz>
  * Requires client code page = 852
  * and character set = ISO8859-2 in smb.conf
  */
-update_map("\173\173\174\174\175\175\176\176\241\244\242\364\243\235\244\317");
-update_map("\245\225\246\227\247\365\250\371\251\346\252\270\253\233\254\215");
-update_map("\256\246\257\275\261\245\262\362\263\210\264\357\265\226\2263\210\264\357\265\226\266\230");
-update_map("\267\363\270\367\271\347\272\255\273\234\274\253\275\361\276\247");
-update_map("\277\276\300\350\301\265\302\266\303\306\304\216\305\221\306\217");
-update_map("\307\200\310\254\311\220\312\250\313\323\314\267\315\326\316\327");
-update_map("\317\322\320\321\321\343\322\325\323\340\324\342\325\212\326\231");
-update_map("\327\236\330\374\331\336\332\351\333\353\334\232\335\355\336\335");
-update_map("\337\341\340\352\341\240\342\203\343\307\344\204\345\222\346\206");
-update_map("\347\207\350\237\351\202\352\251\353\211\354\330\355\241\356\214");
-update_map("\357\324\360\320\361\344\362\345\363\242\364\223\365\213\366\224");
-update_map("\367\366\370\375\371\205\372\243\373\373\374\201\375\354\376\356");
-update_map("\377\372");
 
+/* MSDOS Code Page 852 -> ISO-8859-2 */
+update_map("\241\244\242\364\243\235\244\317\245\225\246\227\247\365");
+update_map("\250\371\251\346\252\270\253\233\254\215\256\246\257\275");
+update_map("\261\245\262\362\263\210\264\357\265\226\266\230\267\363");
+update_map("\270\367\271\347\272\255\273\234\274\253\275\361\276\247\277\276");
+update_map("\300\350\301\265\302\266\303\306\304\216\305\221\306\217\307\200");
+update_map("\310\254\311\220\312\250\313\323\314\267\315\326\316\327\317\322");
+update_map("\320\321\321\343\322\325\323\340\324\342\325\212\326\231\327\236");
+update_map("\330\374\331\336\332\351\333\353\334\232\335\355\336\335\337\341");
+update_map("\340\352\341\240\342\203\343\307\344\204\345\222\346\206\347\207");
+update_map("\350\237\351\202\352\251\353\211\354\330\355\241\356\214\357\324");
+update_map("\360\320\361\344\362\345\363\242\364\223\365\213\366\224\367\366");
+update_map("\370\375\371\205\372\243\373\373\374\201\375\354\376\356\377\372");
 }
 
 /* Init for russian language (iso8859-5) */
index eaf3fe99206c38073c26af2d095877d103c26aab..2c4800b1c2213083f77beea82a8b3f76f8f18b55 100644 (file)
@@ -2386,16 +2386,16 @@ int reply_close(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
   /* try and set the date */
   set_filetime(cnum, Files[fnum].name,mtime);
 
+  DEBUG(3,("%s close fd=%d fnum=%d cnum=%d (numopen=%d)\n",
+          timestring(),Files[fnum].fd_ptr->fd,fnum,cnum,
+          Connections[cnum].num_files_open));
+  
   close_file(fnum,True);
 
   /* We have a cached error */
   if(eclass || err)
     return(ERROR(eclass,err));
 
-  DEBUG(3,("%s close fd=%d fnum=%d cnum=%d (numopen=%d)\n",
-          timestring(),Files[fnum].fd_ptr->fd,fnum,cnum,
-          Connections[cnum].num_files_open));
-  
   return(outsize);
 }
 
@@ -2669,10 +2669,10 @@ int reply_printclose(char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
   if (!CAN_PRINT(cnum))
     return(ERROR(ERRDOS,ERRnoaccess));
   
-  close_file(fnum,True);
-  
   DEBUG(3,("%s printclose fd=%d fnum=%d cnum=%d\n",timestring(),Files[fnum].fd_ptr->fd,fnum,cnum));
   
+  close_file(fnum,True);
+
   return(outsize);
 }