Lines Matching refs:ap
59 Agent *ap;
63 for(ap = first_agent; ap; ap = ap->next_agent)
67 ap,
68 ap->name?ap->name:"NO NAME",
69 address_string(&(ap->address)),
70 ap->timeout,ap->agentID,ap->agentStatus,
71 ap->agentProcessID,
72 ap->first_manager);
87 Agent *ap = first_agent;
91 while(ap)
93 next = ap->next_agent;
95 agent_free(ap);
97 ap = next;
120 void agent_free(Agent *ap)
122 if(ap == NULL)
127 if(ap->first_agent_subtree)
134 free_string_content(ap->agentPersonalFile);
135 free_string_content(ap->agentConfigFile);
136 free_string_content(ap->agentExecutable);
137 free_string_content(ap->agentVersionNum);
138 free_string_content(ap->agentProtocol);
139 free_string_content(ap->agentName);
140 if(ap->name) free(ap->name);
141 free(ap);
142 ap =NULL;
149 Agent *ap;
152 for(ap = first_agent; ap; ap = ap->next_agent)
154 if(ap->agentID == id)
156 return ap;
166 Agent *ap;
169 for(ap = first_agent; ap; ap = ap->next_agent)
171 if(!strcmp(ap->name,name))
173 return ap;
185 Agent *ap;
188 for(ap = first_agent; ap; ap = ap->next_agent)
190 if(ap->address.sin_port == address->sin_port)
192 return ap;
211 Agent *ap, *last=NULL;
214 for(ap = first_agent; ap ; ap = ap->next_agent)
216 if(ap == agent)
218 last = ap;
220 if(ap==NULL) return;
222 first_agent = ap->next_agent;
224 last->next_agent = ap->next_agent;
226 ap->next_agent = NULL;
265 Agent *ap;
268 for (ap = first_agent; ap ; ap = ap->next_agent) {
270 if (ap->numOfFailRequest <= 5)
276 if (!no_outstanding_session_for_the_agent (ap))
280 if ( ap->agentProcessID != 0 && kill (ap->agentProcessID, 0) < 0) {
282 ap->name, ap->agentProcessID ) ;
283 agent_destroy (ap) ;
289 if (MaxFails <= 0 || ap->numOfFailRequest < MaxFails)
309 if (ssa_subagent_is_alive (ap)) {
310 error ("Agent %s appeared dead but responded to ping", ap->name) ;
311 ap->numOfFailRequest = 0 ;
315 error ("Agent not responding: %s -- deleted from the agent table", ap->name ) ;
316 agent_destroy(ap);