diff --git a/daemon/call.c b/daemon/call.c index 6746fe265..4fd789ef0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1146,7 +1146,7 @@ static void callstream_free(void *ptr) { obj_put(s->call); } -static void relays_cache_init(struct relays_cache *c) { +void relays_cache_init(struct relays_cache *c) { memset(c, -1, sizeof(*c)); c->relays_open = 0; c->array_ptrs[0] = c->relays_A; @@ -1194,7 +1194,7 @@ static void relays_cache_port_used(struct relays_cache *c) { c->relays_B[c->relays_open + 1].fd = -1; } -static void relays_cache_cleanup(struct relays_cache *c, struct callmaster *m) { +void relays_cache_cleanup(struct relays_cache *c, struct callmaster *m) { int i; for (i = 0; i < ARRAY_SIZE(c->relays_A); i++) { diff --git a/daemon/call.h b/daemon/call.h index 085108806..12d88fc3d 100644 --- a/daemon/call.h +++ b/daemon/call.h @@ -166,7 +166,10 @@ struct callstream *callstream_new(struct call *ca, int num); void callstream_init(struct callstream *s, struct relays_cache *); void kernelize(struct callstream *c); int call_stream_address(char *o, struct peer *p, enum stream_address_format format, int *len); + +void relays_cache_init(struct relays_cache *c); int relays_cache_want_ports(struct relays_cache *c, int portA, int portB, struct call *call); +void relays_cache_cleanup(struct relays_cache *c, struct callmaster *m); static inline char *call_strdup(struct call *c, const char *s) { char *r;