ctdbSetCurrentNodeName
Set the client-side node name.
Declaration
CTDBRET ctdbSetCurrentNodeName(CTHANDLE Handle, pTEXT NodeName);
Description
When monitoring c-tree Server attached users, well written c-treeDB 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 c-treeDB API SDK error code on failure. |
See c-treeDB API Errors and Return Values for a complete listing of valid c-treeDB 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()