From b8f71759d37f1e74cfc839d2ad86ae6969956161 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 10 Mar 2015 11:20:17 +0800 Subject: [PATCH] add bitcoin_address/privkey --- src/jconf.c | 5 +++++ src/jconf.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/jconf.c b/src/jconf.c index 3807d22d..febd7eb8 100644 --- a/src/jconf.c +++ b/src/jconf.c @@ -101,6 +101,7 @@ jconf_t *read_jconf(const char * file) { static jconf_t conf; + memset(&conf, 0, sizeof(conf)); char *buf; json_value *obj; @@ -177,6 +178,10 @@ jconf_t *read_jconf(const char * file) conf.nofile = value->u.integer; } else if (strcmp(name, "nameserver") == 0) { conf.nameserver = to_string(value); + } else if (strcmp(name, "bitcoin_address") == 0) { + conf.bitcoin_address = to_string(value); + } else if (strcmp(name, "bitcoin_privkey") == 0) { + conf.bitcoin_privkey = to_string(value); } } } else { diff --git a/src/jconf.h b/src/jconf.h index 7504cbbe..3b9c354e 100644 --- a/src/jconf.h +++ b/src/jconf.h @@ -45,6 +45,8 @@ typedef struct { int fast_open; int nofile; char *nameserver; + char *bitcoin_address; + char *bitcoin_privkey; } jconf_t; jconf_t *read_jconf(const char * file);