ctdbSetCurrentNodeName
Set the client-side node name.
Declaration
CTDBRET ctdbSetCurrentNodeName(CTHANDLE Handle, pTEXT NodeName);
Description
When monitoring c-tree Server attached users, well written FairCom DB API client applications should "register" their workstation (node) name using the standard c-tree SETNODE() (SetNodeName() ) function call.
ctdbSetCurrentNodeName() set a client-side node name.
ctdbSetCurrentNodeName() must be called after a successful logon.
This functionality is available only with the c-tree Server. A call to ctdbSetCurrentNodeName() on non-server environment will always return CTDBRET_OK and the node name is ignored.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
ctdbRecordAtPercentile() returns CTDBRET_OK on success or FairCom DB API SDK error code on failure. |
See FairCom DB API Errors and Return Values for a complete listing of valid FairCom DB API error codes and return values.
Example
/* set the c-tree Server node name for this workstation */
if (ctdbSetCurrentNodeName(AnyHandle, "This is my node") != CTDBRET_OK)
printf("ctdbSetCurrrentNodeName() failed\n");
See also
ctdbSetDefaultIndex(), ctdbBuildTargetKey()