Changeset 150


Ignore:
Timestamp:
Aug 20, 2008, 2:29:02 PM (17 years ago)
Author:
Yuri Dario
Message:

Handle automatic reconnection, fixes for return codes.

Location:
branches/client-1.5/src
Files:
2 edited

Legend:

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

    r147 r150  
    856856            pfsa->cUnitAvail = 123456;
    857857            pfsa->cbSector = 2048;
     858
    858859            return rc;
    859860        }
     
    913914                free(pConn);
    914915                pConn = NULL;
     916
    915917        }
    916918
     
    944946// -------------------------------------------------------------
    945947
     948
     949
     950
     951
     952
     953
     954
     955
     956
     957
     958
     959
     960
     961
     962
     963
    946964int APIENTRY NdpQueryPathInfo (HCONNECTION conn, void *plist, char *szPath)
    947965{
     
    954972        int retry = 0;
    955973
    956         do
    957           {
    958974                log("NdpQueryPathInfo in <%s>, retry = %d\n", szPath, retry);
     975
     976
     977
     978
     979
     980
     981
    959982
    960983                do {
    961 
    962                         if (ph->fsphStrChr(szPath, '*') || ph->fsphStrChr(szPath, '?'))
    963                         {
    964                                 rc = ERROR_FILE_NOT_FOUND;
    965                                 break;
    966                         }
    967984
    968985                        rc = pathparser(pRes, pConn, szPath, path);
     
    9921009                        if (rc)
    9931010                        {
     1011
     1012
     1013
     1014
     1015
     1016
     1017
     1018
     1019
     1020
     1021
    9941022                                switch (rc)
    9951023                                {
     
    9991027                                        case ERROR_ACCESS_DENIED:
    10001028                                        case ERROR_INVALID_PARAMETER:
     1029
    10011030                                        break;
    10021031                                        default :
     
    10051034                                        }
    10061035                                }
    1007                                 rc =rc ? rc : ERROR_INVALID_PARAMETER;
    10081036                        }
    10091037                        else
     
    10221050                                        if (rc)
    10231051                                        {       
    1024                                                 rc = rc ? ERROR_PATH_NOT_FOUND : ERROR_INVALID_PARAMETER;
     1052                                            log("NdpQueryPathInfo upper path in <%s>, retry = %d\n",  finfo.fname, retry);
     1053                                            rc = rc ? ERROR_PATH_NOT_FOUND : ERROR_INVALID_PARAMETER;
    10251054                                        }
    10261055                                }
     
    10281057                } while (0);
    10291058                log("NdpQueryPathInfo <%s> (%s) %d\n", szPath, path, rc);
    1030                 retry = rc && !retry;
    1031 
    1032         } while (retry);
    1033        
     1059
    10341060        return rc;
    10351061}
     
    10961122                }
    10971123                rc = smbwrp_filelist( &pRes->srv, pConn->cli, &state);
     1124
     1125
     1126
     1127
     1128
     1129
     1130
     1131
     1132
     1133
     1134
     1135
    10981136
    10991137        log("NdpFindStart <%s> (%s) cnt %d %d\n", szPath, path, count, rc);
  • branches/client-1.5/src/smbwrp.c

    r147 r150  
     1
    12#include "includes.h"
    23
     
    9596        if (cli->fd == -1)
    9697        {
    97                 return ENOTCONN;
     98                return ;
    9899        }
    99100        return maperror(cli_errno(cli));
     
    495496
    496497        debuglocal(4," tconx ok. cli caps %08x\n", c->capabilities);
    497 
     498       
    498499        // save cli_state pointer
    499500        *cli = c;
Note: See TracChangeset for help on using the changeset viewer.