summaryrefslogtreecommitdiff
path: root/proto_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto_text.c')
-rw-r--r--proto_text.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/proto_text.c b/proto_text.c
index 000ddd1..cfe5d97 100644
--- a/proto_text.c
+++ b/proto_text.c
@@ -5,6 +5,10 @@
#include "memcached.h"
#include "proto_text.h"
+// FIXME: only for process_proxy_stats()
+// - some better/different structure for stats subcommands
+// would remove this abstraction leak.
+#include "proto_proxy.h"
#include "authfile.h"
#include "storage.h"
#include "base64.h"
@@ -42,8 +46,6 @@
} \
}
-static void process_command(conn *c, char *command);
-
typedef struct token_s {
char *value;
size_t length;
@@ -481,7 +483,7 @@ int try_read_command_ascii(conn *c) {
assert(cont <= (c->rcurr + c->rbytes));
c->last_cmd_time = current_time;
- process_command(c, c->rcurr);
+ process_command_ascii(c, c->rcurr);
c->rbytes -= (cont - c->rcurr);
c->rcurr = cont;
@@ -792,6 +794,10 @@ static void process_stat(conn *c, token_t *tokens, const size_t ntokens) {
} else if (strcmp(subcommand, "extstore") == 0) {
process_extstore_stats(&append_stats, c);
#endif
+#ifdef PROXY
+ } else if (strcmp(subcommand, "proxy") == 0) {
+ process_proxy_stats(&append_stats, c);
+#endif
} else {
/* getting here means that the subcommand is either engine specific or
is invalid. query the engine and see. */
@@ -2684,7 +2690,7 @@ static void process_refresh_certs_command(conn *c, token_t *tokens, const size_t
// we can't drop out and back in again.
// Leaving this note here to spend more time on a fix when necessary, or if an
// opportunity becomes obvious.
-static void process_command(conn *c, char *command) {
+void process_command_ascii(conn *c, char *command) {
token_t tokens[MAX_TOKENS];
size_t ntokens;