MCPcopy Create free account
hub / github.com/corosync/corosync / member_object_joined

Function member_object_joined

exec/main.c:342–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340static struct memb_ring_id corosync_ring_id;
341
342static void member_object_joined (unsigned int nodeid)
343{
344 char member_ip[ICMAP_KEYNAME_MAXLEN];
345 char member_join_count[ICMAP_KEYNAME_MAXLEN];
346 char member_status[ICMAP_KEYNAME_MAXLEN];
347
348 snprintf(member_ip, ICMAP_KEYNAME_MAXLEN,
349 "runtime.members.%u.ip", nodeid);
350 snprintf(member_join_count, ICMAP_KEYNAME_MAXLEN,
351 "runtime.members.%u.join_count", nodeid);
352 snprintf(member_status, ICMAP_KEYNAME_MAXLEN,
353 "runtime.members.%u.status", nodeid);
354
355 if (icmap_get(member_ip, NULL, NULL, NULL) == CS_OK) {
356 icmap_inc(member_join_count);
357 icmap_set_string(member_status, "joined");
358 } else {
359 icmap_set_string(member_ip, (char*)api->totem_ifaces_print (nodeid));
360 icmap_set_uint32(member_join_count, 1);
361 icmap_set_string(member_status, "joined");
362 }
363
364 log_printf (LOGSYS_LEVEL_DEBUG,
365 "Member joined: %s", api->totem_ifaces_print (nodeid));
366}
367
368static void member_object_left (unsigned int nodeid)
369{

Callers 1

confchg_fnFunction · 0.85

Calls 4

icmap_getFunction · 0.85
icmap_incFunction · 0.85
icmap_set_stringFunction · 0.85
icmap_set_uint32Function · 0.85

Tested by

no test coverage detected