Makes fuse options shared with the fuseapi.

This is needed to be able to use the fuse credential with the new
Hubic API.
This commit is contained in:
Pascal Obry
2014-02-15 11:17:14 +01:00
parent 0948762287
commit 9d87586fcf
3 changed files with 11 additions and 9 deletions
+2
View File
@@ -33,6 +33,8 @@ static int debug = 0;
static int verify_ssl = 1;
static int rhel5_mode = 0;
extern FuseOptions options;
#ifdef HAVE_OPENSSL
#include <openssl/crypto.h>
static pthread_mutex_t *ssl_lockarray;
+8
View File
@@ -9,6 +9,7 @@
#define MAX_PATH_SIZE (1024 + 256 + 3)
#define MAX_URL_SIZE (MAX_PATH_SIZE * 3)
#define USER_AGENT "CloudFuse"
#define OPTION_SIZE 1024
typedef struct curl_slist curl_slist;
@@ -23,6 +24,13 @@ typedef struct dir_entry
struct dir_entry *next;
} dir_entry;
typedef struct options {
char username[OPTION_SIZE];
char password[OPTION_SIZE];
char cache_timeout[OPTION_SIZE];
char verify_ssl[OPTION_SIZE];
} FuseOptions;
void cloudfs_init();
void cloudfs_set_credentials(char *username, char *password);
int cloufds_connect();
+1 -9
View File
@@ -17,9 +17,6 @@
#include "cloudfsapi.h"
#include "config.h"
#define OPTION_SIZE 1024
static int cache_timeout;
typedef struct dir_cache
@@ -424,12 +421,7 @@ char *get_home_dir()
return "~";
}
static struct options {
char username[OPTION_SIZE];
char password[OPTION_SIZE];
char cache_timeout[OPTION_SIZE];
char verify_ssl[OPTION_SIZE];
} options = {
FuseOptions options = {
.username = "",
.password = "",
.cache_timeout = "600",