mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 21:24:28 -08:00
some stderr output on error
This commit is contained in:
@@ -106,12 +106,15 @@ static int _decode_get_session_token(mfhttp * conn, void *user_ptr)
|
|||||||
root = http_parse_buf_json(conn, 0, &error);
|
root = http_parse_buf_json(conn, 0, &error);
|
||||||
|
|
||||||
data = json_object_by_path(root, "response");
|
data = json_object_by_path(root, "response");
|
||||||
if (data == NULL)
|
if (data == NULL) {
|
||||||
|
fprintf(stderr, "json: no /response content\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
session_token = json_object_get(data, "session_token");
|
session_token = json_object_get(data, "session_token");
|
||||||
if (session_token == NULL) {
|
if (session_token == NULL) {
|
||||||
json_decref(root);
|
json_decref(root);
|
||||||
|
fprintf(stderr, "json: no /session_token content\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,10 @@ mfconn *mfconn_create(const char *server, const char *username,
|
|||||||
|
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
return conn;
|
return conn;
|
||||||
else
|
else {
|
||||||
|
fprintf(stderr, "error: mfconn_api_user_get_session_token\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mfconn_destroy(mfconn * conn)
|
void mfconn_destroy(mfconn * conn)
|
||||||
|
|||||||
Reference in New Issue
Block a user