Browse Source

Merge pull request #224 from Logan007/snLstCmmnts

added list of currently managed communities to supernode's management port output
pull/232/head
Luca Deri 5 years ago
committed by GitHub
parent
commit
803155f244
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      sn.c

10
sn.c

@ -350,6 +350,16 @@ static int process_mgmt(n2n_sn_t * sss,
"last reg %lu sec ago\n",
(long unsigned int) (now - sss->stats.last_reg_super));
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
"cur_cmnts");
HASH_ITER(hh, sss->communities, community, tmp) {
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
" [%s]",
community->community);
}
ressize += snprintf(resbuf+ressize, N2N_SN_PKTBUF_SIZE-ressize,
"\n");
r = sendto(sss->mgmt_sock, resbuf, ressize, 0/*flags*/,
(struct sockaddr *)sender_sock, sizeof(struct sockaddr_in));

Loading…
Cancel
Save