summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2017-01-05 11:28:44 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-01-05 20:24:18 -0800
commitaa053b228e01ab079f86d24f3444b2389895effd (patch)
tree765fd27aaeea5bbc2f2bf129890fe346253400c6 /libglusterfs/src/common-utils.h
parentc455c6030f1f1678ae66752e5e11ea988d062df4 (diff)
eventsapi: Use `getaddrinfo` instead of `gethostbyname`
`gethostbyname` is not thread safe. Use `getaddrinfo` to avoid any race or segfault while sending events BUG: 1410313 Change-Id: I164af1f8eb72501fb0ed47445e68d896f7c3e908 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/16327 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 324555b34f5..b77b7ad97de 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -868,4 +868,8 @@ gf_bits_index (uint64_t n);
const char*
gf_fop_string (glusterfs_fop_t fop);
+
+char *
+get_ip_from_addrinfo (struct addrinfo *addr, char **ip);
+
#endif /* _COMMON_UTILS_H */