Changeset 968
- Timestamp:
- Aug 19, 2016, 3:27:58 PM (9 years ago)
- Location:
- trunk/client/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/src/ndpsmb.c
r966 r968 232 232 } 233 233 234 235 void getfindinfo(Connection * pConn, FILEFINDBUF3 * stat, smbwrp_fileinfo * finfo) 236 { 237 char * name = ph->fsphStrRChr(finfo->fname, '\\'); 238 239 if (name) 240 name++; 241 else 242 name = finfo->fname; 243 244 if (!*name) 245 name = pConn->pRes->srv.share_name; 246 247 strncpy(stat->achName, name, CCHMAXPATHCOMP - 1); 248 stat->cbFile = finfo->size; 249 stat->cbFileAlloc = stat->cbFile; 250 stat->oNextEntryOffset = 0ul; 251 stat->cchName = strlen(stat->achName); 252 stat->attrFile = (finfo->attr & 0x37); 253 254 fsphUnixTimeToDosDate(pConn->pRes, finfo->mtime, &stat->fdateLastWrite, &stat->ftimeLastWrite); 255 fsphUnixTimeToDosDate(pConn->pRes, finfo->ctime, &stat->fdateCreation, &stat->ftimeCreation); 256 fsphUnixTimeToDosDate(pConn->pRes, finfo->atime, &stat->fdateLastAccess, &stat->ftimeLastAccess); 257 return; 258 } 259 260 int getfindinfoL(Connection * pConn, void * plist, smbwrp_fileinfo * finfo, ULONG ulAttribute, char * mask) 234 // 235 // maps smbwrp_fileinfo data fields into a native OS/2 file informations 236 // and add the result to Netdrive internal list 237 // 238 int addFindInfoL(Connection * pConn, void * plist, smbwrp_fileinfo * finfo, ULONG ulAttribute, char * mask) 261 239 { 262 240 FILESTATUS3L stat = {0}; … … 361 339 pRes->krb5support = 0; 362 340 #endif 363 pRes->pdc = NULL;364 341 pRes->loglevel = 0; 365 342 … … 500 477 * the above values come from the gui. default: timeout 10; listings: 32 501 478 */ 502 dircache_create( &pRes->pdc, (void*) pRes,479 dircache_create(pRes->pdc, (void*) pRes, 503 480 pRes->cachetimeout, pRes->cachedepth); 504 481 … … 969 946 rc = NO_ERROR; 970 947 finfo.easize = -1; 971 getfindinfoL(pConn, plist, &finfo, 0, NULL);948 addFindInfoL(pConn, plist, &finfo, 0, NULL); 972 949 break; 973 950 } … … 1028 1005 { 1029 1006 finfo.easize = -1; 1030 getfindinfoL(pConn, plist, &finfo, 0, NULL);1007 addFindInfoL(pConn, plist, &finfo, 0, NULL); 1031 1008 } 1032 1009 else if (rc == ERROR_FILE_NOT_FOUND) … … 1121 1098 /* 1122 1099 * This plugin always reads a complete directory listing and 1123 * filters results using actual mask (state.dir_mask) in getfindinfoL.1100 * filters results using actual mask (state.dir_mask) in addFindInfoL. 1124 1101 * May be this was a workaround for some server bug. 1125 1102 * If this will be changed, then directory listing cache must … … 1839 1816 { 1840 1817 finfo.easize = -1; 1841 getfindinfoL(pConn, plist, &finfo, 0, NULL);1818 addFindInfoL(pConn, plist, &finfo, 0, NULL); 1842 1819 } 1843 1820 } while (0); -
trunk/client/src/smbwrp.c
r966 r968 730 730 strncat(fullname, finfo->fname, sizeof(fullname) - strlen(fullname) -1); 731 731 strncpy(st->finfo.fname, fullname, sizeof(st->finfo.fname)); 732 getfindinfoL(st->pConn, st->plist, &st->finfo, st->ulAttribute, st->dir_mask);732 addFindInfoL(st->pConn, st->plist, &st->finfo, st->ulAttribute, st->dir_mask); 733 733 } 734 734 return; -
trunk/client/src/smbwrp.h
r966 r968 206 206 void smbwrp_initthread(void); 207 207 208 /* wrapper around fsphAddFile32L */ 209 int addFindInfoL(Connection *pConn, void *plist, smbwrp_fileinfo *finfo, 210 ULONG ulAttribute, char *mask); 211 208 212 #endif /* _SMBWRP_H */
Note:
See TracChangeset
for help on using the changeset viewer.