Merge, just renaming old error macros.
This commit is contained in:
24
src/serve.h
24
src/serve.h
@@ -3,14 +3,14 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
# define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "parse.h"
|
||||
#include "acl.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
static const int block_allocation_resolution = 4096;//128<<10;
|
||||
|
||||
@@ -49,8 +49,6 @@ struct client_tbl_entry {
|
||||
struct server {
|
||||
/** address/port to bind to */
|
||||
union mysockaddr bind_to;
|
||||
/** access control list */
|
||||
struct acl * acl;
|
||||
/** (static) file name to serve */
|
||||
char* filename;
|
||||
/** file name of INCOMPLETE flag */
|
||||
@@ -71,6 +69,14 @@ struct server {
|
||||
/** to interrupt accept loop and clients, write() to close_signal[1] */
|
||||
struct self_pipe * close_signal;
|
||||
|
||||
/** access control list */
|
||||
struct acl * acl;
|
||||
/** acl_updated_signal will be signalled after the acl struct
|
||||
* has been replaced
|
||||
*/
|
||||
struct self_pipe * acl_updated_signal;
|
||||
pthread_mutex_t l_acl;
|
||||
|
||||
struct mirror_status* mirror;
|
||||
int server_fd;
|
||||
int control_fd;
|
||||
@@ -80,11 +86,15 @@ struct server {
|
||||
struct client_tbl_entry nbd_client[MAX_NBD_CLIENTS];
|
||||
};
|
||||
|
||||
struct server * server_create( char* s_ip_address, char* s_port, char* s_file,
|
||||
char *s_ctrl_sock, int default_deny, int acl_entries, char** s_acl_entries );
|
||||
void server_destroy( struct server * );
|
||||
int server_is_closed(struct server* serve);
|
||||
void server_dirty(struct server *serve, off64_t from, int len);
|
||||
int server_lock_io( struct server * serve);
|
||||
void server_lock_io( struct server * serve);
|
||||
void server_unlock_io( struct server* serve );
|
||||
void serve_signal_close( struct server *serve );
|
||||
void server_replace_acl( struct server *serve, struct acl * acl);
|
||||
|
||||
|
||||
struct mode_readwrite_params {
|
||||
|
Reference in New Issue
Block a user