From ab3a47ae4116fc2ed20142cb9c983b3e55d40ac7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 25 Jan 2013 16:33:36 -0500 Subject: [PATCH] finish renaming control.[ch] to control_tcp.[ch] --- daemon/call.c | 2 +- daemon/call.h | 2 +- daemon/control_tcp.c | 18 +++++++++--------- daemon/control_tcp.h | 4 ++-- daemon/main.c | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 0e412090e..b3eb7548c 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -18,7 +18,7 @@ #include "aux.h" #include "log.h" #include "kernel.h" -#include "control.h" +#include "control_tcp.h" #include "streambuf.h" #include "redis.h" #include "xt_MEDIAPROXY.h" diff --git a/daemon/call.h b/daemon/call.h index e06d95d0d..ba1d58e72 100644 --- a/daemon/call.h +++ b/daemon/call.h @@ -9,7 +9,7 @@ #include #include -#include "control.h" +#include "control_tcp.h" #include "control_udp.h" #include "obj.h" #include "aux.h" diff --git a/daemon/control_tcp.c b/daemon/control_tcp.c index fcf242adc..29ca16f06 100644 --- a/daemon/control_tcp.c +++ b/daemon/control_tcp.c @@ -8,7 +8,7 @@ #include #include -#include "control.h" +#include "control_tcp.h" #include "poller.h" #include "aux.h" #include "streambuf.h" @@ -27,13 +27,13 @@ struct control_stream { struct streambuf *outbuf; struct sockaddr_in inaddr; - struct control *control; + struct control_tcp *control; struct poller *poller; int linked:1; }; -struct control { +struct control_tcp { struct obj obj; int fd; @@ -52,7 +52,7 @@ struct control { static void control_stream_closed(int fd, void *p, uintptr_t u) { struct control_stream *s = p; - struct control *c; + struct control_tcp *c; GList *l = NULL; mylog(LOG_INFO, "Control connection from " DF " closed", DP(s->inaddr)); @@ -78,7 +78,7 @@ restart: } -static void control_list(struct control *c, struct control_stream *s) { +static void control_list(struct control_tcp *c, struct control_stream *s) { struct control_stream *i; GList *l; @@ -99,7 +99,7 @@ static int control_stream_parse(struct control_stream *s, char *line) { int ovec[60]; int ret; char **out; - struct control *c = s->control; + struct control_tcp *c = s->control; str *output = NULL; ret = pcre_exec(c->parse_re, c->parse_ree, line, strlen(line), 0, 0, ovec, G_N_ELEMENTS(ovec)); @@ -209,7 +209,7 @@ static void control_stream_free(void *p) { static void control_incoming(int fd, void *p, uintptr_t u) { int nfd; - struct control *c = p; + struct control_tcp *c = p; struct control_stream *s; struct poller_item i; struct sockaddr_in sin; @@ -262,9 +262,9 @@ fail: } -struct control *control_new(struct poller *p, u_int32_t ip, u_int16_t port, struct callmaster *m) { +struct control_tcp *control_tcp_new(struct poller *p, u_int32_t ip, u_int16_t port, struct callmaster *m) { int fd; - struct control *c; + struct control_tcp *c; struct poller_item i; struct sockaddr_in sin; const char *errptr; diff --git a/daemon/control_tcp.h b/daemon/control_tcp.h index 39c0ec707..b595fd304 100644 --- a/daemon/control_tcp.h +++ b/daemon/control_tcp.h @@ -30,12 +30,12 @@ struct poller; struct callmaster; -struct control; +struct control_tcp; struct control_stream; -struct control *control_new(struct poller *, u_int32_t, u_int16_t, struct callmaster *); +struct control_tcp *control_tcp_new(struct poller *, u_int32_t, u_int16_t, struct callmaster *); void control_stream_printf(struct control_stream *, const char *, ...) __attribute__ ((format (printf, 2, 3))); diff --git a/daemon/main.c b/daemon/main.c index 1680f9ba4..bf58a3806 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -10,7 +10,7 @@ #include #include "poller.h" -#include "control.h" +#include "control_tcp.h" #include "control_udp.h" #include "control_ng.h" #include "aux.h" @@ -367,7 +367,7 @@ void redis_mod_verify(void *dlh) { void create_everything(struct main_context *ctx) { struct callmaster_config mc; - struct control *c; + struct control_tcp *ct; struct control_udp *cu; struct control_ng *cn; int kfd = -1; @@ -414,10 +414,10 @@ void create_everything(struct main_context *ctx) { mc.tos = tos; mc.b2b_url = b2b_url; - c = NULL; + ct = NULL; if (listenport) { - c = control_new(ctx->p, listenp, listenport, ctx->m); - if (!c) + ct = control_tcp_new(ctx->p, listenp, listenport, ctx->m); + if (!ct) die("Failed to open TCP control connection port\n"); }