Visual Studio compile fixes.
This commit is contained in:
parent
03b4252ab5
commit
bf4ad5624a
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* uhub - A tiny ADC p2p connection hub
|
* uhub - A tiny ADC p2p connection hub
|
||||||
* Copyright (C) 2007-2009, Jan Vidar Krey
|
* Copyright (C) 2007-2011, Jan Vidar Krey
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "uhub.h"
|
#include "uhub.h"
|
||||||
|
|
||||||
|
|
||||||
static int arg_verbose = 5;
|
static int arg_verbose = 5;
|
||||||
static int arg_fork = 0;
|
static int arg_fork = 0;
|
||||||
static int arg_check_config = 0;
|
static int arg_check_config = 0;
|
||||||
@ -145,6 +144,8 @@ int main_loop()
|
|||||||
|
|
||||||
hub_set_variables(hub, &acl);
|
hub_set_variables(hub, &acl);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
hub_event_loop(hub);
|
hub_event_loop(hub);
|
||||||
|
|
||||||
hub_free_variables(hub);
|
hub_free_variables(hub);
|
||||||
@ -231,7 +232,6 @@ void print_usage(char* program)
|
|||||||
|
|
||||||
void parse_command_line(int argc, char** argv)
|
void parse_command_line(int argc, char** argv)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETOPT
|
|
||||||
int opt;
|
int opt;
|
||||||
while ((opt = getopt(argc, argv, "vqfc:l:hu:g:VCsSLp:")) != -1)
|
while ((opt = getopt(argc, argv, "vqfc:l:hu:g:VCsSLp:")) != -1)
|
||||||
{
|
{
|
||||||
@ -302,7 +302,6 @@ void parse_command_line(int argc, char** argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* HAVE_GETOPT */
|
|
||||||
|
|
||||||
if (arg_config == NULL)
|
if (arg_config == NULL)
|
||||||
{
|
{
|
||||||
|
@ -22,17 +22,13 @@
|
|||||||
|
|
||||||
#include "plugin_api/handle.h"
|
#include "plugin_api/handle.h"
|
||||||
|
|
||||||
#ifdef PLUGIN_SUPPORT
|
|
||||||
|
|
||||||
struct hub_config;
|
struct hub_config;
|
||||||
struct linked_list;
|
struct linked_list;
|
||||||
struct plugin_handle;
|
struct plugin_handle;
|
||||||
|
|
||||||
struct uhub_plugin
|
struct uhub_plugin
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DLOPEN
|
|
||||||
void* handle;
|
void* handle;
|
||||||
#endif
|
|
||||||
plugin_unregister_f unregister;
|
plugin_unregister_f unregister;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,9 +50,5 @@ extern struct uhub_plugin* plugin_open(const char* filename);
|
|||||||
extern void plugin_close(struct uhub_plugin*);
|
extern void plugin_close(struct uhub_plugin*);
|
||||||
extern void* plugin_lookup_symbol(struct uhub_plugin*, const char* symbol);
|
extern void* plugin_lookup_symbol(struct uhub_plugin*, const char* symbol);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* PLUGIN_SUPPORT */
|
|
||||||
|
|
||||||
#endif /* HAVE_UHUB_PLUGIN_LOADER_H */
|
#endif /* HAVE_UHUB_PLUGIN_LOADER_H */
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* uhub - A tiny ADC p2p connection hub
|
* uhub - A tiny ADC p2p connection hub
|
||||||
* Copyright (C) 2010, Jan Vidar Krey
|
* Copyright (C) 2011, Jan Vidar Krey
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "plugin_api/handle.h"
|
#include "plugin_api/handle.h"
|
||||||
@ -101,6 +101,9 @@ static int parse_line(char* line, int line_count, void* ptr_data)
|
|||||||
struct linked_list* users = (struct linked_list*) ptr_data;
|
struct linked_list* users = (struct linked_list*) ptr_data;
|
||||||
struct cfg_tokens* tokens = cfg_tokenize(line);
|
struct cfg_tokens* tokens = cfg_tokenize(line);
|
||||||
enum auth_credentials cred;
|
enum auth_credentials cred;
|
||||||
|
char* credential;
|
||||||
|
char* username;
|
||||||
|
char* password;
|
||||||
|
|
||||||
if (cfg_token_count(tokens) == 0)
|
if (cfg_token_count(tokens) == 0)
|
||||||
{
|
{
|
||||||
@ -114,9 +117,9 @@ static int parse_line(char* line, int line_count, void* ptr_data)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* credential = cfg_token_get_first(tokens);
|
credential = cfg_token_get_first(tokens);
|
||||||
char* username = cfg_token_get_next(tokens);
|
username = cfg_token_get_next(tokens);
|
||||||
char* password = cfg_token_get_next(tokens);
|
password = cfg_token_get_next(tokens);
|
||||||
|
|
||||||
if (!auth_string_to_cred(credential, &cred))
|
if (!auth_string_to_cred(credential, &cred))
|
||||||
{
|
{
|
||||||
|
@ -250,6 +250,7 @@ typedef unsigned __int64 uint64_t;
|
|||||||
#define open _open
|
#define open _open
|
||||||
#define close _close
|
#define close _close
|
||||||
#define read _read
|
#define read _read
|
||||||
|
#define NEED_GETOPT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* HAVE_UHUB_SYSTEM_H */
|
#endif /* HAVE_UHUB_SYSTEM_H */
|
||||||
|
@ -63,6 +63,7 @@ extern "C" {
|
|||||||
#include "util/config_token.h"
|
#include "util/config_token.h"
|
||||||
#include "util/credentials.h"
|
#include "util/credentials.h"
|
||||||
#include "util/floodctl.h"
|
#include "util/floodctl.h"
|
||||||
|
#include "util/getopt.h"
|
||||||
#include "util/ipcalc.h"
|
#include "util/ipcalc.h"
|
||||||
#include "util/list.h"
|
#include "util/list.h"
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user