diff --git a/libdc/include/dc/util.h b/libdc/include/dc/util.h index 3b63e94..eb6bea7 100644 --- a/libdc/include/dc/util.h +++ b/libdc/include/dc/util.h @@ -3,6 +3,6 @@ #include -void ncdc_util_dump_json(json_t *j); +void dc_util_dump_json(json_t *j); #endif diff --git a/libdc/src/api.c b/libdc/src/api.c index 1e04042..2a33087 100644 --- a/libdc/src/api.c +++ b/libdc/src/api.c @@ -350,6 +350,7 @@ bool dc_api_userinfo(dc_api_t api, dc_account_t login, /* TODO: parse json and store info in user */ + dc_util_dump_json(reply); ret = true; diff --git a/libdc/src/internal.h b/libdc/src/internal.h index 01c0b17..4229468 100644 --- a/libdc/src/internal.h +++ b/libdc/src/internal.h @@ -21,6 +21,8 @@ #include #include +#include + //#define DEBUG #define return_if_true(v,r) do { if (v) return r; } while(0) diff --git a/libdc/src/util.c b/libdc/src/util.c index 021a527..d56b3ae 100644 --- a/libdc/src/util.c +++ b/libdc/src/util.c @@ -2,7 +2,7 @@ #include "internal.h" -void ncdc_util_dump_json(json_t *j) +void dc_util_dump_json(json_t *j) { return_if_true(j == NULL,); char *str = json_dumps(j, JSON_COMPACT); diff --git a/ncdc/src/ncdc.c b/ncdc/src/ncdc.c index 90e50a9..571e18a 100644 --- a/ncdc/src/ncdc.c +++ b/ncdc/src/ncdc.c @@ -240,7 +240,7 @@ int main(int ac, char **av) return 3; } - asprintf(&dc_private_dir, "%s/.ncdc", getenv("HOME")); + asprintf(&dc_private_dir, "%s/.ndc", getenv("HOME")); if (mkdir(dc_private_dir, 0755) < 0) { if (errno != EEXIST) { fprintf(stderr, "failed to make %s: %s\n", dc_private_dir,