Changeset 131 for branches/samba-3.0


Ignore:
Timestamp:
Apr 24, 2008, 7:31:30 PM (18 years ago)
Author:
Yuri Dario
Message:

Check for resource type at mount time, only for nd/ndpm, so ndpm can retry operation. ticket:58.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/ndpsmb/ndpsmb.c

    r127 r131  
    184184        return dst;
    185185}
     186
     187
    186188
    187189/* uppercased type of resource */
     
    914916}
    915917
     918
     919
     920
     921
     922
     923
     924
     925
     926
     927
     928
     929
     930
     931
     932
     933
     934
     935
     936
     937
     938
     939
     940
     941
     942
     943
     944
     945
     946
     947
     948
     949
     950
     951
     952
     953
     954
     955
     956
     957
     958
     959
     960
     961
     962
     963
     964
     965
     966
     967
     968
     969
     970
     971
     972
     973
     974
     975
     976
     977
     978
     979
     980
     981
     982
     983
     984
     985
     986
     987
     988
     989
     990
     991
     992
     993
     994
     995
    916996
    917997int APIENTRY NdpMountResource (HRESOURCE *presource, int type, NDPROPERTYHANDLE properties)
     
    9201000        unsigned long objany = OBJ_ANY;
    9211001        Resource *pRes = NULL;
    922         /* since we support only 1 type of resources we do not need */
     1002
     1003        log("NdpMountResource in\n");
     1004
     1005        /* since samba plugin support only 1 type of resources we do not need */
    9231006        /* to check what the found type really is */
    9241007        rc = DosAllocMem((void **)&pRes, sizeof(Resource), PAG_COMMIT | PAG_READ | PAG_WRITE | objany);
     
    9371020                pRes->properties = properties;
    9381021                pRes->objany = objany;
     1022
    9391023                rc = initResource (pRes);
    940                 if (rc == NO_ERROR)
    941                 {
     1024                // try to connect to resource (check type) only if thread!=1, so ndctl startup
     1025                // is not slowed down by network connections.
     1026                // ndctl does mounting on main thread (#1)
     1027                // nd/ndpm do not use main thread
     1028                if (!rc && _gettid()!=1)
     1029                    rc = checkMountResource( pRes);
     1030                if (!rc)
     1031                {
     1032                        // store resource data
    9421033                        *presource = (HRESOURCE)pRes;
    9431034                }
     
    9471038                }
    9481039        }
    949         log("NdpMountResource %d\n", rc);
    950         return rc;
    951 }
     1040        log("NdpMountResource rc=%d\n", rc);
     1041        return rc;
     1042}
     1043
     1044// -------------------------------------------------------------
    9521045
    9531046int APIENTRY NdpCreateConnection (HRESOURCE resource, HCONNECTION *pconn)
     
    10431136}
    10441137
     1138
    10451139
    10461140int APIENTRY NdpFreeConnection (HCONNECTION conn)
Note: See TracChangeset for help on using the changeset viewer.