mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
fix indentation
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
#include "../utils/http.h"
|
||||
|
||||
#define X_LINK_TYPE(a,b,c) c,
|
||||
const char *link_types[]={
|
||||
const char *link_types[] = {
|
||||
#include "link_type.def"
|
||||
NULL
|
||||
NULL
|
||||
};
|
||||
#undef X_LINK_TYPE
|
||||
|
||||
#undef X_LINK_TYPE
|
||||
|
||||
int mfapi_check_response(json_t * response, const char *apicall)
|
||||
{
|
||||
|
||||
@@ -47,8 +47,8 @@ enum mfconn_device_change_type {
|
||||
enum {
|
||||
#include "link_type.def"
|
||||
};
|
||||
#undef X_LINK_TYPE
|
||||
|
||||
#undef X_LINK_TYPE
|
||||
|
||||
struct mfconn_device_change {
|
||||
enum mfconn_device_change_type change;
|
||||
|
||||
@@ -28,15 +28,13 @@
|
||||
#include "../file.h"
|
||||
#include "../apicalls.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
static int _decode_file_get_links(mfhttp * conn, void *data);
|
||||
|
||||
int mfconn_api_file_get_links(mfconn * conn, mffile * file,
|
||||
const char *quickkey,uint32_t link_mask)
|
||||
const char *quickkey, uint32_t link_mask)
|
||||
{
|
||||
const char *api_call;
|
||||
extern const char *link_types[]; // declared in apicalls.c
|
||||
char *link_params = NULL;
|
||||
int retval;
|
||||
int len;
|
||||
mfhttp *http;
|
||||
@@ -56,18 +54,14 @@ int mfconn_api_file_get_links(mfconn * conn, mffile * file,
|
||||
if (len != 11 && len != 15)
|
||||
return -1;
|
||||
|
||||
link_params = strdup_printf("link_type=%s",
|
||||
link_types[link_mask]);
|
||||
|
||||
for (i = 0; i < mfconn_get_max_num_retries(conn); i++) {
|
||||
api_call = mfconn_create_signed_get(conn, 0, "file/get_links.php",
|
||||
"?quick_key=%s"
|
||||
"&%s"
|
||||
"&link_type=%s"
|
||||
"&response_format=json",
|
||||
quickkey,link_params);
|
||||
quickkey, link_types[link_mask]);
|
||||
if (api_call == NULL) {
|
||||
fprintf(stderr, "mfconn_create_signed_get failed\n");
|
||||
if(link_params != NULL) free(link_params);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -95,8 +89,6 @@ int mfconn_api_file_get_links(mfconn * conn, mffile * file,
|
||||
}
|
||||
}
|
||||
|
||||
if(link_params != NULL) free(link_params);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -266,8 +266,7 @@ const char *mfconn_create_unsigned_get(mfconn * conn, int ssl,
|
||||
|
||||
api_request = strdup_printf("%s//%s/api/%s/%s",
|
||||
(ssl ? "https:" : "http:"),
|
||||
conn->server,
|
||||
MFAPI_VERSION, api);
|
||||
conn->server, MFAPI_VERSION, api);
|
||||
|
||||
// compute the amount of space requred to realloc() the request
|
||||
bytes_to_alloc = api_args_len;
|
||||
@@ -356,8 +355,7 @@ const char *mfconn_create_signed_get(mfconn * conn, int ssl,
|
||||
|
||||
api_request = strdup_printf("%s//%s/api/%s/%s",
|
||||
(ssl ? "https:" : "http:"),
|
||||
conn->server,
|
||||
MFAPI_VERSION, api);
|
||||
conn->server, MFAPI_VERSION, api);
|
||||
|
||||
call_hash = mfconn_create_call_signature(conn, api_request, api_args);
|
||||
signature = strdup_printf("&signature=%s", call_hash);
|
||||
|
||||
Reference in New Issue
Block a user