add bitcoin_address/privkey

This commit is contained in:
kevin
2015-03-10 11:20:17 +08:00
parent f3e5d4462c
commit b8f71759d3
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -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 {
+2
View File
@@ -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);