Changeset 126 for branches/samba-3.0/source/ndpsmb/ndpsmb.c
- Timestamp:
- Apr 7, 2008, 9:33:39 AM (18 years ago)
- File:
-
- 1 edited
-
branches/samba-3.0/source/ndpsmb/ndpsmb.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/ndpsmb/ndpsmb.c
r123 r126 12 12 #define NULL ((void *)0) 13 13 14 15 16 17 14 18 void log(const char *fmt, ...) 15 19 { … … 39 43 } 40 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 41 94 int StrLen(char * s) 42 95 { … … 339 392 stat->attrFile = (finfo->attr & 0x37); 340 393 341 ph->fsphUnixTimeToDosDate(finfo->mtime, &stat->fdateLastWrite, &stat->ftimeLastWrite);342 ph->fsphUnixTimeToDosDate(finfo->ctime, &stat->fdateCreation, &stat->ftimeCreation);343 ph->fsphUnixTimeToDosDate(finfo->atime, &stat->fdateLastAccess, &stat->ftimeLastAccess);394 fsphUnixTimeToDosDate(finfo->mtime, &stat->fdateLastWrite, &stat->ftimeLastWrite); 395 fsphUnixTimeToDosDate(finfo->ctime, &stat->fdateCreation, &stat->ftimeCreation); 396 fsphUnixTimeToDosDate(finfo->atime, &stat->fdateLastAccess, &stat->ftimeLastAccess); 344 397 } 345 398 … … 369 422 stat.attrFile = (finfo->attr & 0x37); 370 423 371 ph->fsphUnixTimeToDosDate(finfo->mtime, &stat.fdateLastWrite, &stat.ftimeLastWrite); 372 ph->fsphUnixTimeToDosDate(finfo->ctime, &stat.fdateCreation, &stat.ftimeCreation); 373 ph->fsphUnixTimeToDosDate(finfo->atime, &stat.fdateLastAccess, &stat.ftimeLastAccess); 424 fsphUnixTimeToDosDate(finfo->mtime, &stat.fdateLastWrite, &stat.ftimeLastWrite); 425 fsphUnixTimeToDosDate(finfo->ctime, &stat.fdateCreation, &stat.ftimeCreation); 426 fsphUnixTimeToDosDate(finfo->atime, &stat.fdateLastAccess, &stat.ftimeLastAccess); 427 debug_printf( "fname %s\n", finfo->fname); 428 debug_printf( "mtime %d %s", finfo->mtime, ctime( &finfo->mtime)); 429 debug_printf( "ftimeLastAccess %02d:%02d:%02d\n", stat.ftimeLastWrite.hours, stat.ftimeLastWrite.minutes, stat.ftimeLastWrite.twosecs*2); 374 430 375 431 ph->fsphAddFile32L(plist, &stat, name, StrLen(name), finfo, sizeof(*finfo), 0); … … 1179 1235 NDPATHELEMENT *pel = ph->fsphNameElem(0); 1180 1236 1181 log("NdpFindStart in\n");1237 ("NdpFindStart in\n"); 1182 1238 do 1183 1239 { … … 1282 1338 do 1283 1339 { 1284 log("NdpQueryInfo in <%s>, retry = %d\n", szPath, retry);1340 ("NdpQueryInfo in <%s>, retry = %d\n", szPath, retry); 1285 1341 1286 1342 do { … … 1414 1470 char path[CCHMAXPATH+1] = {0}; 1415 1471 1416 log("NdpSetPathInfo in\n");1472 ("NdpSetPathInfo in\n"); 1417 1473 do { 1418 1474 rc = checkconnection(pConn); … … 1431 1487 1432 1488 StrNCpy(finfo->fname, path, sizeof(finfo->fname) - 1); 1433 ph->fsphDosDateToUnixTime(pfi->stat.fdateLastWrite, pfi->stat.ftimeLastWrite, (unsigned long *)&(finfo->mtime));1489 &(finfo->mtime)); 1434 1490 if (ifL) 1435 1491 { … … 2140 2196 smbwrp_fileinfo * finfo = (smbwrp_fileinfo *)(pConn->mem + sizeof(pConn->file)); 2141 2197 2142 log("NdpFileQueryInfo in\n");2198 ("NdpFileQueryInfo in\n"); 2143 2199 do { 2144 2200 if (pConn->file.fd < 0 || !*pConn->file.fname) … … 2381 2437 smbwrp_fileinfo * finfo = (smbwrp_fileinfo *)pConn->mem; 2382 2438 2383 log("NdpFileSetInfo in\n");2439 ("NdpFileSetInfo in\n"); 2384 2440 do { 2385 2441 if (pConn->file.fd < 0 || !*pConn->file.fname) … … 2404 2460 // deferred setinfo - on closing the file 2405 2461 pConn->file.openattr = attrFile; 2406 ph->fsphDosDateToUnixTime(pfi->stat.fdateLastWrite, pfi->stat.ftimeLastWrite, (unsigned long *)&(pConn->file.mtime)); 2462 fsphDosDateToUnixTime(pfi->stat.fdateLastWrite, pfi->stat.ftimeLastWrite, &(pConn->file.mtime)); 2463 debug_printf("NdpFileSetInfo mtime %d\n", pConn->file.mtime); 2407 2464 } while (0); 2408 2465 log("NdpFileSetInfo <%s> %08x %d %d\n", pConn->file.fd < 0 ? "!null!" : pConn->file.fname, attrFile, rc, pConn->rc);
Note:
See TracChangeset
for help on using the changeset viewer.
