TT#156900 rename functions to avoid namespace conflict

Change-Id: I676e35319518b468ed72da2dd58db7ec3ca33ea1
pull/1439/head
Richard Fuchs 4 years ago
parent b1d17cdcef
commit cf34ecc24c

@ -572,7 +572,7 @@ void call_timer(void *ptr) {
last_run = tv_start;
ZERO(hlp);
hlp.addr_sfd = g_hash_table_new(g_endpoint_hash, g_endpoint_eq);
hlp.addr_sfd = g_hash_table_new(endpoint_t_hash, endpoint_t_eq);
ITERATE_CALL_LIST_START(CALL_ITERATOR_TIMER, c);
call_timer_iterator(c, &hlp);

@ -589,7 +589,7 @@ void notify_ng_tcp_clients(str *data) {
void control_ng_init() {
mutex_init(&rtpe_cngs_lock);
rtpe_cngs_hash = g_hash_table_new(g_sockaddr_hash, g_sockaddr_eq);
rtpe_cngs_hash = g_hash_table_new(sockaddr_t_hash, sockaddr_t_eq);
cookie_cache_init(&ng_cookie_cache);
}
void control_ng_cleanup() {

@ -469,13 +469,13 @@ static unsigned int __ip6_packet_header(unsigned char *out, const endpoint_t *sr
unsigned int sockaddr_hash(const sockaddr_t *a) {
return a->family->hash(a) ^ g_direct_hash(a->family);
}
int sockaddr_eq(const sockaddr_t *a, const sockaddr_t *b) {
bool sockaddr_eq(const sockaddr_t *a, const sockaddr_t *b) {
return a->family == b->family && a->family->eq(a, b);
}
unsigned int g_sockaddr_hash(const void *a) {
guint sockaddr_t_hash(gconstpointer a) {
return sockaddr_hash(a);
}
int g_sockaddr_eq(const void *a, const void *b) {
gint sockaddr_t_eq(gconstpointer a, gconstpointer b) {
return sockaddr_eq(a, b);
}
@ -483,13 +483,13 @@ int g_sockaddr_eq(const void *a, const void *b) {
unsigned int endpoint_hash(const endpoint_t *a) {
return sockaddr_hash(&a->address) ^ a->port;
}
int endpoint_eq(const endpoint_t *a, const endpoint_t *b) {
bool endpoint_eq(const endpoint_t *a, const endpoint_t *b) {
return sockaddr_eq(&a->address, &b->address) && a->port == b->port;
}
unsigned int g_endpoint_hash(const void *a) {
guint endpoint_t_hash(gconstpointer a) {
return endpoint_hash(a);
}
int g_endpoint_eq(const void *a, const void *b) {
gint endpoint_t_eq(gconstpointer a, const void *b) {
return endpoint_eq(a, b);
}

@ -8,6 +8,7 @@
#include <fcntl.h>
#include <errno.h>
#include <netinet/tcp.h>
#include <stdbool.h>
@ -230,14 +231,14 @@ void endpoint_parse_sockaddr_storage(endpoint_t *, struct sockaddr_storage *);
void kernel2endpoint(endpoint_t *ep, const struct re_address *ra);
unsigned int sockaddr_hash(const sockaddr_t *);
int sockaddr_eq(const sockaddr_t *, const sockaddr_t *); /* true/false */
unsigned int g_sockaddr_hash(const void *);
int g_sockaddr_eq(const void *, const void *); /* true/false */
bool sockaddr_eq(const sockaddr_t *, const sockaddr_t *);
guint sockaddr_t_hash(gconstpointer); // for glib
gint sockaddr_t_eq(gconstpointer, gconstpointer); // true/false, for glib
unsigned int endpoint_hash(const endpoint_t *);
int endpoint_eq(const endpoint_t *, const endpoint_t *); /* true/false */
unsigned int g_endpoint_hash(const void *);
int g_endpoint_eq(const void *, const void *); /* true/false */
bool endpoint_eq(const endpoint_t *, const endpoint_t *); /* true/false */
guint endpoint_t_hash(gconstpointer); // for glib
gint endpoint_t_eq(gconstpointer, gconstpointer); // true/false, for glib
INLINE sockfamily_t *get_socket_family_enum(enum socket_families i) {
if (i >= __SF_LAST)

Loading…
Cancel
Save