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