Changeset 499
- Timestamp:
- Dec 13, 2010, 5:10:38 PM (15 years ago)
- Location:
- trunk/client/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/src/Makefile.kmk
r472 r499 32 32 printf.c \ 33 33 util.c \ 34 dircache.c \ 34 35 smbwrp.c 35 36 -
trunk/client/src/debug.c
r448 r499 53 53 struct stat filestat; 54 54 55 // do we have to log at all 56 if (!debuglvl(level)) 57 { 58 return; 59 } 60 55 61 // if the file ndpsmb.dbg is around we write a logfile 56 62 if (!debugfile[0]) … … 82 88 } /* endif */ 83 89 84 if (!debuglvl(level))85 {86 return;87 }88 90 do 89 91 { -
trunk/client/src/help/ndpsmb.ipf
r494 r499 138 138 :li.:link reftype=hd res=001.Version 1.0:elink. 139 139 :li.:link reftype=hd res=002.Version 1.5:elink. 140 :li.:link reftype=hd res=003.Version 1.6:elink. 140 :li.:link reftype=hd res=003.Version 2.0:elink. 141 :li.:link reftype=hd res=004.Version 2.1:elink. 141 142 :eul 142 143 :h2 res=001.Version 1.0 … … 211 212 :eul. 212 213 :eul. 213 :h2 res=002.Version 1.5 214 :h2 res=002.Version 1.5 214 215 :ul. 215 216 :li.alpha1 … … 254 255 :li.Fix help files 255 256 :eul. 256 :eul. 257 :h2 res=003.Version 1.6 258 :p. 259 :ul. 260 :li.alpha1 257 :li.1.5.3 258 :ul. 259 :li.Fix timestamp problem 260 :eul. 261 :eul. 262 :h2 res=003.Version 2.0 263 :ul. 264 :li.2.0.0 265 :ul. 266 :li.added dir caching 267 :eul. 268 :eul. 269 :h2 res=004.Version 2.1 270 :ul. 271 :li.2.1.0 alpha1 261 272 :ul. 262 273 :li.moved to samba 3.3 source base 263 :eul. 264 :li.beta1 265 :ul. 266 :li.first public build 267 :li.fixed some traps from alpha1 268 :eul. 269 :li.beta2 270 :ul. 271 :li.fixed a timezone problem 272 :eul. 273 :eul. 274 :p. 274 :li.new merge of 2.0 code and 1.6 code 275 :eul. 276 :eul. 275 277 .****************************************************** 276 278 :h1.Credit … … 282 284 :li.Alex Taylor (aka AlexT) 283 285 :li.Nikolay Kolosov (aka nickk) 286 :li.Vitali Pelenyov (aka sunlover) 284 287 :li.and all we missed 285 288 :eul. -
trunk/client/src/help/ndpsmb_de.ipf
r494 r499 141 141 :li.:link reftype=hd res=001.Version 1.0:elink. 142 142 :li.:link reftype=hd res=002.Version 1.5:elink. 143 :li.:link reftype=hd res=003.Version 1.6:elink. 143 :li.:link reftype=hd res=003.Version 2.0:elink. 144 :li.:link reftype=hd res=004.Version 2.1:elink. 144 145 :eul 145 146 :h2 res=001.Version 1.0 … … 249 250 :p. 250 251 (ACHTUNG! Kompatibilit&ae.tswarnung&colon. Die Token m&ue.ssen auch aus alten *.evp&comma. *.ndc und volumes.cfg Dateien entfernt werden&comma. anonsten scheitert die Wiederherstellung von Verbindungsprofilen) 251 :li.Logging-Funktion fr Samba Meldungen hinzugef &ue.gt252 :li.Logging-Funktion fr Samba Meldungen hinzugefgt 252 253 :eul. 253 254 :li.1.5.1 254 255 :ul. 255 :li.Fix f &ue.r den Crash auf Quadcore Maschinen256 :li.Fix fr den Crash auf Quadcore Maschinen 256 257 :eul. 257 258 :li.1.5.2 … … 259 260 :li.Korrekturen in den Hilfedateien 260 261 :eul. 261 :eul. 262 :h2 res=003.Version 1.6 263 :p. 264 :ul. 265 :li.alpha1 266 :ul. 262 :li.1.5.3 263 :ul. 264 :li.Zeitzonenproblem behoben 265 :eul. 266 :eul. 267 :h2 res=003.Version 2.0 268 :ul. 269 :li.2.0.0 270 :ul. 271 :li.Caching von Verzeichnissen 272 :eul. 273 :eul. 274 :h2 res=004.Version 2.1 275 :ul. 276 :li.2.1.0 alpha1 267 277 :li.Update auf Samba 3.3 Client-Code 268 :eul. 269 :li.beta1 270 :ul. 271 :li.erster &oe.ffentlicher build 272 :li.einige Abst&ue.rze von alpha1 repariert 273 :eul. 274 :li.beta2 275 :ul. 276 :li.ein Zeitzonenproblem behoben 277 :eul. 278 :eul. 279 :p. 278 :li.neuer Merge von 1.6 code und 2.0 code 279 :eul. 280 :eul. 280 281 .****************************************************** 281 282 :h1.Credit … … 287 288 :li.Alex Taylor (aka AlexT) 288 289 :li.Nikolay Kolosov (aka nickk) 290 :li.Vitali Pelenyov (aka sunlover) 289 291 :li.und alle&comma. die wir vergessen haben! 290 292 :eul. -
trunk/client/src/help/ndpsmb_fr.ipf
r494 r499 206 206 :li.:link reftype=hd res=001.Version 1.0:elink. 207 207 :li.:link reftype=hd res=002.Version 1.5:elink. 208 :li.:link reftype=hd res=003.Version 1.6:elink. 208 :li.:link reftype=hd res=003.Version 2.0:elink. 209 :li.:link reftype=hd res=004.Version 2.1:elink. 209 210 :eul. 210 211 :h2 res=001.Version 1.0 … … 344 345 :li.Corriger les fichier d'aide 345 346 :eul. 346 :eul. 347 :h2 res=003.Version 1.6 348 :p. 349 :ul. 350 :li.alpha1 351 :ul. 352 :li.Passage au code du client Samba 3.3 353 :eul. 354 :li.beta1 355 :ul. 356 :li.first public build 357 :li.fixed some traps from alpha1 358 :eul. 359 :li.beta2 360 :ul. 361 :li.fixed a timezone problem 347 :li.1.5.3 348 :ul. 349 :li.Fix timestamp problem 350 :eul. 351 :eul. 352 :h2 res=003.Version 2.0 353 :ul. 354 :li.2.0.0 355 :ul. 356 :li.added dir caching 357 :eul. 358 :eul. 359 :h2 res=004.Version 2.1 360 :ul. 361 :li.2.1.0 alpha1 362 :ul. 363 :li.moved to samba 3.3 source base 364 :li.new merge of 2.0 code and 1.6 code 362 365 :eul. 363 366 :eul. … … 374 377 :li.Alex Taylor (alias AlexT) 375 378 :li.Nikolay Kolosov (alias nickk) 379 :li.Vitali Pelenyov (aka sunlover) 376 380 :li.et tous ceux que nous avons pu oublier 377 381 :eul. -
trunk/client/src/help/readme.txt
r494 r499 245 245 - added logging feature for samba messages 246 246 247 247 v1.5.1: 248 248 - Fix crashes on quadcore machines 249 249 250 250 v1.5.2: 251 251 - Fix help files 252 252 253 v1.6.0 alpha1: 253 v1.5.3: 254 - Fix timestamp problem 255 256 v2.0.0 : 257 - added dir caching 258 259 v2.1.0 alpha1 : 254 260 - moved to samba 3.3 source base 255 256 v1.6.0 beta1: 257 - first public build 258 - fixed some traps from alpha1 259 260 v1.6.0 beta2: 261 - fixed a timezone problem 261 - new merge of 2.0 code and 1.6 code 262 -
trunk/client/src/help/readme_de.txt
r494 r499 256 256 - Logging-Funktion fr Samba Meldungen hinzugefgt 257 257 258 v1.5.1: 258 v1.5.1 259 259 - Behebung der Abstrze auf Quadcore Maschinen 260 260 261 v1.5.2: 261 v1.5.2 262 262 - Korrekturen an den Hilfedateien 263 263 264 v1.6.0 alpha1: 264 v1.5.3 265 - Zeitzonenproblem behoben 266 267 v2.0.0 268 - Caching von Verzeichnissen 269 270 v2.1.0 alpha1: 265 271 - Update auf Samba 3.3 Client-Code 266 267 v1.6.0 beta1: 268 - erster ffentlicher build 269 - einige Abstrze von alpha1 repariert 270 271 v1.6.0 beta2: 272 - ein Zeitzonenproblem behoben 272 - neuer Merge von 1.6 code und 2.0 code -
trunk/client/src/help/readme_fr.txt
r494 r499 317 317 - added logging feature for samba messages 318 318 319 v1.5.1 :319 v1.5.1 : 320 320 - Fix crashes on quadcore machines 321 321 322 v1.5.2 :322 v1.5.2 : 323 323 - Corriger les fichiers d'aide 324 324 325 v1.6.0 alpha1: 325 v1.5.3 : 326 - Fix timestamp problem 327 328 v2.0.0 : 329 - added dir caching 330 331 v2.1.0 alpha1 : 326 332 - Passage au code du client Samba 3.3 327 328 v1.6.0 beta1: 329 - first public build 330 - fixed some traps from alpha1 331 332 v1.6.0 beta2: 333 - fixed a timezone problem 333 - new merge of 2.0 code and 1.6 code 334 334 335 335 336 Traduction franaise : Guillaume Gay <guillaume.gay@bigfoot.com> -
trunk/client/src/ndpsmb.c
r494 r499 223 223 224 224 225 staticPLUGINHELPERTABLE2L *ph;225 PLUGINHELPERTABLE2L *ph; 226 226 static int ifL; 227 227 … … 396 396 pRes->krb5support = 0; 397 397 #endif 398 pRes->pdc = NULL; 398 399 399 400 t = 0, q = NULL; … … 500 501 } 501 502 } 503 504 /* Create a directory cache with expiration time 15 seconds and up to 32 listings cached. */ 505 dircache_create(&pRes->pdc, 10, 32); 502 506 503 507 return rc; … … 723 727 { 724 728 Resource *pRes = (Resource *)resource; 729 dircache_delete(pRes->pdc); 725 730 MemSet(&pRes->srv, 0, sizeof(pRes->srv)); 726 731 free(pRes); … … 958 963 959 964 do { 965 /* First check if there is information in the directory cache. */ 966 unsigned long ulAge = 0; 967 if (dircache_find_path(pRes->pdc, szPath, &finfo, &ulAge)) 968 { 969 if (ulAge <= 15) /* @todo configurable. */ 970 { 971 rc = NO_ERROR; 972 finfo.easize = -1; 973 getfindinfoL(pConn, plist, &finfo, 0, NULL); 974 break; 975 } 976 } 960 977 961 978 rc = pathparser(pRes, pConn, szPath, path); … … 1087 1104 strcpy( state.dir_mask, mask); 1088 1105 strcpy( state.mask, path); 1106 state.fullpath = szPath; 1107 /* This plugin always reads a complete directory listing and filters results 1108 * using actual mask (state.dir_mask) in getfindinfoL. 1109 * May be this was a workaround for some server bug. 1110 * If this will be changed, then directory listing cache must be changed too, 1111 * and must remember the mask, which was used to obtain a listing. 1112 * Now the directory cache saves complete directory listings and then uses them to find 1113 * information about single files. 1114 * However, with a directory cache, it is probably faster to get a full listing and 1115 * then use it to obtain info about separate files than to perform a network 1116 * list query operation using actual wild cards for each file. Some application, 1117 * for example OpenOffice, do this. 1118 */ 1089 1119 p = getlastslash(state.mask); 1090 1120 if (p) … … 1097 1127 strcpy(state.mask, "\\*"); 1098 1128 } 1129 debuglocal(9,"NdpFindStart: dir [%s], dir_mask [%s], mask [%s], szPath [%s]\n", 1130 state.dir, state.dir_mask, state.mask, state.fullpath); 1099 1131 rc = smbwrp_filelist( &pRes->srv, pConn->cli, &state); 1100 1132 // we need to handle reconnection also here, because NdpQueryPathInfo … … 1463 1495 debuglocal(9,"NdpForceDelete in\n"); 1464 1496 1497 dircache_invalidate(szFile, pRes->pdc, 1); 1498 1465 1499 do { 1466 1500 rc = pathparser(pRes, pConn, szFile, path); … … 1487 1521 debuglocal(9,"NdpCreateDir in\n"); 1488 1522 1523 dircache_invalidate(szDirName, pRes->pdc, 1); 1524 1489 1525 do { 1490 1526 rc = pathparser(pRes, pConn, szDirName, path); … … 1511 1547 debuglocal(9,"NdpDeleteDir in\n"); 1512 1548 1549 dircache_invalidate(szDir, pRes->pdc, 1); 1550 1513 1551 do { 1514 1552 rc = pathparser(pRes, pConn, szDir, path); … … 1536 1574 1537 1575 debuglocal(9,"NdpMove in from <%s> to <%s>\n", szSrc, szDst); 1576 1577 dircache_invalidate(szSrc, pRes->pdc, 1); 1578 dircache_invalidate(szDst, pRes->pdc, 1); 1538 1579 1539 1580 do … … 1590 1631 debuglocal(9,"smbopen in %d\n", pConn->file.fd); 1591 1632 1633 if (flags & O_CREAT) 1634 { 1635 dircache_invalidate(szFileName, pRes->pdc, 1); 1636 } 1592 1637 do { 1593 1638 if (pConn->file.fd > 0) -
trunk/client/src/smbwrp.c
r494 r499 1105 1105 1106 1106 ZERO_STRUCTP(finfo); 1107 debuglocal(9,"fname %s (serverzone %d, level %d)\n",finfo->fname, cli->serverzone, level);1108 1107 1109 1108 switch (level) { … … 1303 1302 return -1; 1304 1303 } 1304 1305 /* Try to get the listing from cache. */ 1306 if (dircache_list_files(fn, state, &total_received)) 1307 { 1308 /* Got from cache. */ 1309 return(total_received); 1310 } 1305 1311 1306 1312 while (ff_eos == 0) { … … 1514 1520 total_received = -1; 1515 1521 } else { 1522 void *dircachectx = dircache_write_begin(state, total_received); 1523 1516 1524 /* no connection problem. let user function add each entry */ 1517 1525 rdata_end = dirlist + dirlist_len; … … 1525 1533 } 1526 1534 fn( mnt,&finfo, Mask, state ); 1535 1536 /* Also add the entry to the cache. */ 1537 dircache_write_entry(dircachectx, &finfo); 1527 1538 } 1539 1540 dircache_write_end(dircachectx); 1541 1528 1542 } 1529 1543 -
trunk/client/src/smbwrp.h
r472 r499 125 125 #endif 126 126 127 struct DirectoryCache; 128 127 129 typedef struct _Resource 128 130 { … … 133 135 int easupport; 134 136 int krb5support; 137 struct DirectoryCache *pdc; 135 138 } Resource; 136 139 … … 157 160 void *plist; 158 161 unsigned long ulAttribute; 162 const char *fullpath; 159 163 } filelist_state; 160 164 … … 186 190 int _System smbwrp_dskattr(cli_state * cli, FSALLOCATE *pfsa); 187 191 192 /* Directory cache helpers. */ 193 int dircache_create(struct DirectoryCache **ppdc, unsigned long ulExpirationTime, int cMaxEntries); 194 void dircache_delete(struct DirectoryCache *pdc); 195 196 typedef void FNADDDIRENTRY(const char*, smbwrp_fileinfo *, const char *, void *); 197 typedef FNADDDIRENTRY *PFNADDDIRENTRY; 198 199 /* Note: dircache_list_files or dircache_write_begin construct the directory path 200 * using information in the filelist_state structure. 201 */ 202 int dircache_list_files(PFNADDDIRENTRY fn, 203 filelist_state *state, 204 int *ptotal_received); 205 206 void *dircache_write_begin(filelist_state *state, 207 int cFiles); 208 void dircache_write_entry(void *dircachectx, const smbwrp_fileinfo *finfo); 209 void dircache_write_end(void *dircachectx); 210 211 void dircache_invalidate(const char *path, 212 struct DirectoryCache *pdc, 213 int fParent); 214 215 int dircache_find_path(struct DirectoryCache *pdc, 216 const char *path, 217 smbwrp_fileinfo *finfo, 218 unsigned long *pulAge); 219 220 /* Prototype the debug log helper. */ 221 void debuglocal(int level, const char * fmt, ...); 222 188 223 #endif /* _SMBWRP_H */
Note:
See TracChangeset
for help on using the changeset viewer.