diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-02 17:09:38 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-02 17:09:38 +0400 |
commit | f3ad9c6f1e91c9912dbe730fdec350b5fc908672 (patch) | |
tree | 005e5568431db09becaa9b67a33dfc11f80bba7f /src/memcached-test.c | |
parent | e6a1d22de250c10992b484635fd95a03f197f779 (diff) | |
download | rspamd-f3ad9c6f1e91c9912dbe730fdec350b5fc908672.tar.gz rspamd-f3ad9c6f1e91c9912dbe730fdec350b5fc908672.zip |
* Retab, no functional changes
Diffstat (limited to 'src/memcached-test.c')
-rw-r--r-- | src/memcached-test.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/memcached-test.c b/src/memcached-test.c index ef81cf73c..5e5557337 100644 --- a/src/memcached-test.c +++ b/src/memcached-test.c @@ -37,14 +37,14 @@ #define HOST "127.0.0.1" #define PORT 11211 -memcached_param_t cur_param; +memcached_param_t cur_param; static void -test_memc_callback (memcached_ctx_t *ctx, memc_error_t error, void *data) -{ - int s; - int r; - int *num = ((int *)data); +test_memc_callback (memcached_ctx_t * ctx, memc_error_t error, void *data) +{ + int s; + int r; + int *num = ((int *)data); printf ("result of memc command '%s' is '%s'\n", ctx->cmd, memc_strerror (error)); /* Connect */ if (*num == 0) { @@ -66,13 +66,13 @@ test_memc_callback (memcached_ctx_t *ctx, memc_error_t error, void *data) } -int +int main (int argc, char **argv) { - memcached_ctx_t mctx; - char *addr, buf[512]; - int num = 0; - + memcached_ctx_t mctx; + char *addr, buf[512]; + int num = 0; + event_init (); strcpy (cur_param.key, "testkey"); strcpy (buf, "test_value"); @@ -85,7 +85,7 @@ main (int argc, char **argv) else { addr = HOST; } - + mctx.protocol = TCP_TEXT; mctx.timeout.tv_sec = 1; mctx.timeout.tv_usec = 0; @@ -97,7 +97,7 @@ main (int argc, char **argv) inet_aton (addr, &mctx.addr); memc_init_ctx (&mctx); - + event_loop (0); return 0; } |