comm_addr_to_string_fn *addr_to_string;
};
+static inline const char *comm_addr_to_string(const struct comm_addr *ca)
+{
+ return ca->comm->addr_to_string(ca->comm->st, ca);
+}
+
/* LOG interface */
#define LOG_MESSAGE_BUFLEN 1023
i++, (argp+=stride?stride:sizeof(*args))) {
const struct comm_addr *ca=(void*)argp;
slog(st, LOG_PEER_ADDRS, " args: addrs[%d]=%s",
- i, ca->comm->addr_to_string(ca->comm->st,ca));
+ i, comm_addr_to_string(ca));
}
for (i=0; i<dst->npeers; i++) {
struct timeval diff;
timersub(tv_now,&dst->peers[i].last,&diff);
const struct comm_addr *ca=&dst->peers[i].addr;
slog(st, LOG_PEER_ADDRS, " peers: addrs[%d]=%s T-%ld.%06ld",
- i, ca->comm->addr_to_string(ca->comm->st,ca),
+ i, comm_addr_to_string(ca),
(unsigned long)diff.tv_sec, (unsigned long)diff.tv_usec);
}
}
if (logwhy)
Message(M_INFO,"%s: %08"PRIx32"<-%08"PRIx32": %08"PRIx32":"
" %s; sending NAK\n",
- dest->comm->addr_to_string(dest->comm->st,dest),
+ comm_addr_to_string(dest),
our_index, their_index, msgtype, logwhy);
dest->comm->sendmsg(dest->comm->st, buf, dest);
}