move mfconn_update_secret_key into the apicalls

This commit is contained in:
josch
2014-12-05 14:02:33 +01:00
parent 7e26de7e2a
commit 73123d87e9
30 changed files with 13 additions and 30 deletions

View File

@@ -57,6 +57,7 @@ int mfconn_api_device_get_changes(mfconn * conn, uint64_t revision,
http_get_buf(http, api_call, _decode_device_get_changes,
(void *)changes);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -65,6 +65,7 @@ int mfconn_api_device_get_patch(mfconn * conn, mfpatch * patch,
retval = http_get_buf(http, api_call, _decode_device_get_patch,
(void *)patch);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -48,6 +48,7 @@ int mfconn_api_device_get_status(mfconn * conn, uint64_t * revision)
http_get_buf(http, api_call, _decode_device_get_status,
(void *)revision);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -73,6 +73,7 @@ int mfconn_api_device_get_updates(mfconn * conn, const char *quickkey,
retval = http_get_buf(http, api_call, _decode_device_get_updates,
(void *)patches);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -47,6 +47,7 @@ int mfconn_api_file_delete(mfconn * conn, const char *quickkey)
http = http_create();
retval = http_get_buf(http, api_call, mfapi_decode_common, "file/delete");
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -61,6 +61,7 @@ int mfconn_api_file_get_info(mfconn * conn, mffile * file,
http = http_create();
retval = http_get_buf(http, api_call, _decode_file_get_info, file);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -59,6 +59,7 @@ int mfconn_api_file_get_links(mfconn * conn, mffile * file,
http = http_create();
retval = http_get_buf(http, api_call, _decode_file_get_links, file);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -61,6 +61,7 @@ int mfconn_api_folder_create(mfconn * conn, const char *parent,
retval = http_get_buf(http, api_call, mfapi_decode_common,
"folder/create");
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -48,6 +48,7 @@ int mfconn_api_folder_delete(mfconn * conn, const char *folderkey)
retval = http_get_buf(http, api_call, mfapi_decode_common,
"folder/delete");
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -89,6 +89,7 @@ mfconn_api_folder_get_content(mfconn * conn, int mode, const char *folderkey,
_decode_folder_get_content_files,
(void *)mffile_result);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -64,6 +64,7 @@ mfconn_api_folder_get_info(mfconn * conn, mffolder * folder,
http = http_create();
retval = http_get_buf(http, api_call, _decode_folder_get_info, folder);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);

View File

@@ -84,6 +84,7 @@ mfconn_api_upload_simple(mfconn * conn, const char *folderkey,
file_size, file_hash,
_decode_upload_simple, upload_key);
http_destroy(http);
mfconn_update_secret_key(conn);
free(file_hash);
free((void *)api_call);

View File

@@ -45,6 +45,7 @@ int mfconn_api_user_get_info(mfconn * conn)
http = http_create();
retval = http_get_buf(http, api_call, _decode_user_get_info, NULL);
http_destroy(http);
mfconn_update_secret_key(conn);
free((void *)api_call);