Ignore:
Timestamp:
Aug 19, 2016, 3:27:58 PM (9 years ago)
Author:
Yuri Dario
Message:

Use a better name for getfindinfoL() since its task changed. Remove
getfindinfo().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/ndpsmb.c

    r966 r968  
    232232}
    233233
    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//
     238int addFindInfoL(Connection * pConn, void * plist, smbwrp_fileinfo * finfo, ULONG ulAttribute, char * mask)
    261239{
    262240        FILESTATUS3L stat = {0};
     
    361339        pRes->krb5support = 0;
    362340#endif
    363         pRes->pdc = NULL;
    364341        pRes->loglevel = 0;
    365342
     
    500477         * the above values come from the gui. default: timeout 10; listings: 32
    501478        */
    502         dircache_create(&pRes->pdc, (void*) pRes,
     479        dircache_create(pRes->pdc, (void*) pRes,
    503480                        pRes->cachetimeout, pRes->cachedepth);
    504481
     
    969946                 rc = NO_ERROR;
    970947                 finfo.easize = -1;
    971                  getfindinfoL(pConn, plist, &finfo, 0, NULL);
     948                 addFindInfoL(pConn, plist, &finfo, 0, NULL);
    972949                 break;
    973950              }
     
    10281005           {
    10291006              finfo.easize = -1;
    1030               getfindinfoL(pConn, plist, &finfo, 0, NULL);
     1007              addFindInfoL(pConn, plist, &finfo, 0, NULL);
    10311008           }
    10321009           else if (rc == ERROR_FILE_NOT_FOUND)
     
    11211098        /*
    11221099         * 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.
    11241101         * May be this was a workaround for some server bug.
    11251102         * If this will be changed, then directory listing cache must
     
    18391816           {
    18401817              finfo.easize = -1;
    1841               getfindinfoL(pConn, plist, &finfo, 0, NULL);
     1818              addFindInfoL(pConn, plist, &finfo, 0, NULL);
    18421819           }
    18431820        } while (0);
Note: See TracChangeset for help on using the changeset viewer.