From e830bf57eb5966af5c6d0744a7e1e01409995378 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 11 Sep 2014 12:24:49 -0400 Subject: [PATCH] update for redis module --- daemon/call.c | 13 +++++-------- daemon/call.h | 3 +++ daemon/main.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index a34bc7337..5fc655a8a 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -305,11 +305,8 @@ static void unkernelize(struct packet_stream *); static void __stream_unkernelize(struct packet_stream *ps); static void stream_unkernelize(struct packet_stream *ps); static void __monologue_destroy(struct call_monologue *monologue); -static struct interface_address *get_interface_from_address(struct local_interface *lif, struct in6_addr *addr); static struct interface_address *get_interface_address(struct local_interface *lif, int family); -static struct local_interface *get_local_interface(struct callmaster *m, const str *name); static const GQueue *get_interface_addresses(struct local_interface *lif, int family); -static struct interface_address *get_any_interface_address(struct local_interface *lif); @@ -2067,7 +2064,7 @@ get: if (!media->local_address) { ilog(LOG_WARNING, "No usable address in interface '"STR_FORMAT"' found, using default", STR_FMT(ifname)); - media->local_address = get_any_interface_address(media->interface); + media->local_address = get_any_interface_address(media->interface, media->desired_family); media->desired_family = family_from_address(&media->local_address->addr); } } @@ -2856,7 +2853,7 @@ void callmaster_config_init(struct callmaster *m) { } } -static struct local_interface *get_local_interface(struct callmaster *m, const str *name) { +struct local_interface *get_local_interface(struct callmaster *m, const str *name) { struct local_interface *lif; if (!name || !name->s) @@ -2892,11 +2889,11 @@ static struct interface_address *get_interface_address(struct local_interface *l } /* safety fallback */ -static struct interface_address *get_any_interface_address(struct local_interface *lif) { +struct interface_address *get_any_interface_address(struct local_interface *lif, int family) { struct interface_address *ifa; GQueue q = G_QUEUE_INIT; - get_all_interface_addresses(&q, lif, AF_INET); + get_all_interface_addresses(&q, lif, family); ifa = q.head->data; g_queue_clear(&q); return ifa; @@ -2910,7 +2907,7 @@ void get_all_interface_addresses(GQueue *q, struct local_interface *lif, int fam g_queue_append(q, get_interface_addresses(lif, AF_INET)); } -static struct interface_address *get_interface_from_address(struct local_interface *lif, struct in6_addr *addr) { +struct interface_address *get_interface_from_address(struct local_interface *lif, const struct in6_addr *addr) { GQueue *q; GList *l; struct interface_address *ifa; diff --git a/daemon/call.h b/daemon/call.h index 323caa8c5..0066d0d8f 100644 --- a/daemon/call.h +++ b/daemon/call.h @@ -433,6 +433,9 @@ int call_stream_address(char *, struct packet_stream *, enum stream_address_form int call_stream_address46(char *o, struct packet_stream *ps, enum stream_address_format format, int *len, struct interface_address *ifa); void get_all_interface_addresses(GQueue *q, struct local_interface *lif, int family); +struct local_interface *get_local_interface(struct callmaster *m, const str *name); +struct interface_address *get_any_interface_address(struct local_interface *lif, int family); +struct interface_address *get_interface_from_address(struct local_interface *lif, const struct in6_addr *addr); const struct transport_protocol *transport_protocol(const str *s); diff --git a/daemon/main.c b/daemon/main.c index 159fe79d5..7afdc7036 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -28,7 +28,7 @@ -#define REDIS_MODULE_VERSION "redis/5" +#define REDIS_MODULE_VERSION "redis/6"