Deletes the specified session variables from the session store.
Syntax
int Sm_AgentApi_DelSessionVariables ( const void* pHandle, const Sm_AgentApi_ResourceContext_t* pResourceContext, const char* lpszSessionId, long nNumReqAttributes, Sm_AgentApi_Attribute_t* pReqAttributes, long* pRespNumAttributes, Sm_AgentApi_Attribute_t** ppRespAttributes );
Parameter |
I/O |
Description |
---|---|---|
pHandle |
I |
Agent API session handle returned in parameter ppHandle of Sm_AgentApi_Init(). |
pResourceContext |
I |
Reserved for future use. Set all fields to 0. |
lpszSessionId |
I |
A unique identifier of the session for which the variable is to be deleted. Variables can only be deleted for an active session. After a successful login, the session ID is returned in the lpszSessionId field of the structure Sm_AgentApi_Session_t. |
nNumReqAttributes |
I |
Size of the array of session variables in pReqAttributes. |
pReqAttributes |
I |
An array of attributes representing the names of session variables to be deleted. Set the variable name in the field lpszAttributeOid of structure Sm_AgentApi_Attribute_t. Set the nAttributeFlags field of the Sm_AgentApi_Attribute_t structure to SM_AGENTAPI_REQATTR_FLAGS_NONE. The structure's nAttributeId and nAttributeTTL fields are ignored. |
pRespNumAttributes |
O |
Size of the array of responses, if any, in ppRespAttributes. |
ppRespAttributes |
O |
If all the specified variables are deleted, no response attributes are returned in this parameter. If this function returns SM_AGENTAPI_UNRESOLVED, the response attribute result set will contain variables that could not be deleted. Also, each response attribute will have the field nAttributeFlags of the structure Sm_AgentApi_Attribute_t set to SM_AGENTAPI_RESPATTR_FLAGS_UNRESOLVED. The structure's nAttributeId and nAttributeTTL fields are ignored. |
Return Values
Remarks
This function fails if the session referenced by lpszSessionId is not active, or the connection to the session store is lost.
To release the memory allocated for any variables returned in the ppRespAttributes parameter, call Sm_AgentApi_FreeAttributes().
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |