From our documentation (SDK C-library wiki.ca.com) this is the call sequence for a custom agent:
Sm_AgentApi_GetConfig() // Required with central host configuration
Sm_AgentApi_SetAgentInstanceInfo() For agent discovery (12.5 agents and later)
Sm_AgentApi_SetDefaultAgentId() // Central host configuration only
// . . .
// Call other Agent API functions here, including
// periodic calling of Sm_AgentApi_DoManagement()
Could you please assure me that in a 4.x version of custom agent any function DOES NOT call into its body the function Sm_AgentApi_Init?
I would be assured that for example INSIDE the Sm_AgentApi_DoManagement (or any other ones) BODY there is NO any call to Sm_AgentApi_Init.
Really thanks in advance,
I can confirm this. No other functions call Init() within it.
Let me know if you have any other concerns?
Some of the old document mentioned
"applications should not call init and unInit more than once in their lifetime"
SAP Portal Services
Therefore, Sm_AgentApi_Init should not be called within the function.
thanks for your prompt answers.
The question came from a customer site where it seemed a custom agent switched connection to Policy Servers with no apparent reasons. So I was convincing the customer that the only point where sdk set the connection (managing a round robin or failover based on nFailover parameter) in inside Sm_AgentApi_Init.