Ignore:
Timestamp:
Jul 26, 2016, 11:47:31 AM (9 years ago)
Author:
Paul Smedley
Message:

Introduce smb_echo, used to confirm server connection is still active before trying a connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/client-3.0/src/ndpsmb.c

    r932 r933  
    11881188                debuglocal(9,"NdpFindStart: dir [%s], dir_mask [%s], mask [%s], szPath [%s]\n",
    11891189                        state.dir, state.dir_mask, state.mask, state.fullpath);
     1190
     1191                /* use cli_echo to check the connection is alive - if not, reconnect */
     1192                rc = smbwrp_echo(pConn->cli);
     1193                if (rc)
     1194                {
     1195                debuglocal(4,"NdpFindStart, smbwrp_echo rc = %d, reconnecting.....\n",rc);
     1196                        int rcCon = smbwrp_connect( pRes, &pConn->cli);
     1197                        if (rcCon)
     1198                                return ERROR_PATH_NOT_FOUND;
     1199                }
    11901200                rc = smbwrp_filelist( &pRes->srv, pConn->cli, &state);
    11911201                // we need to handle reconnection also here, because NdpQueryPathInfo
Note: See TracChangeset for help on using the changeset viewer.