Ignore:
Timestamp:
Feb 9, 2011, 11:02:12 AM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Client 2.0: reconnect fix and text updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/client-2.0/src/smbwrp.c

    r534 r547  
    489489        }
    490490
     491        cli_set_timeout(c, 10000); /* 10 seconds. */
     492
    491493        if (!NT_STATUS_IS_OK(cli_connect(c, server_n, &ip)))
    492494        {
     
    907909        }
    908910//debuglocal(2,("getattr rc1 %d\n", os2cli_errno(cli)));
     911
     912        if (cli->fd == -1)
     913        {
     914           /* fd == -1 means the connection is broken */
     915           return maperror(ENOTCONN);
     916        }
    909917
    910918        /* If the path is not on a share (it is a workgroup or a server),
     
    932940        if (cli->capabilities & CAP_NT_SMBS && !(cli->capabilities & CAP_NOPATHINFO2))
    933941        {
    934                 int rc = os2cli_errno(cli);
     942                int ret = cli_errno(cli);
    935943                // cli_qpathinfo* reports EINVAL when path of given file not exists
    936944                // thus there is no real situation when EINVAL should be returned to
    937945                // client at this point, we just replace it to ENOTDIR
    938                 if (rc == EINVAL)
    939                 {
    940                         rc = maperror(ENOTDIR);
    941                 }
    942                 return rc;
     946                if (ret == EINVAL)
     947                {
     948                        ret = ENOTDIR;
     949                }
     950                return maperror(ret);
    943951        }
    944952
Note: See TracChangeset for help on using the changeset viewer.