MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / get_capability_status

Function get_capability_status

modules/clusterer/clusterer.c:286–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286int get_capability_status(cluster_info_t *cluster, str *capability)
287{
288 struct local_cap *cap;
289
290 for (cap = cluster->capabilities; cap &&
291 str_strcmp(capability, &cap->reg.name); cap = cap->next) ;
292 if (!cap) {
293 LM_ERR("Capability [%.*s] not found\n",
294 capability->len, capability->s);
295 return -1;
296 }
297
298 return (cap->flags&CAP_STATE_ENABLED) ?
299 CAP_ENABLED : CAP_DISABLED;
300}
301
302/* @return:
303 * 0 : success, message sent

Callers 5

handle_sync_requestFunction · 0.85
handle_sync_packetFunction · 0.85
clusterer_send_msgFunction · 0.85
clusterer_bcast_msgFunction · 0.85
bin_rcv_mod_packetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected