dump information
This commit is contained in:
parent
05694d2611
commit
1be026187c
@ -3,6 +3,6 @@
|
||||
|
||||
#include <jansson.h>
|
||||
|
||||
void ncdc_util_dump_json(json_t *j);
|
||||
void dc_util_dump_json(json_t *j);
|
||||
|
||||
#endif
|
||||
|
@ -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;
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <event.h>
|
||||
#include <event2/thread.h>
|
||||
|
||||
#include <dc/util.h>
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
#define return_if_true(v,r) do { if (v) return r; } while(0)
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user