[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4785-gedac3f7
Jeremy Allison
jra at samba.org
Tue Jan 6 04:21:29 GMT 2009
The branch, v3-3-test has been updated
via edac3f78c27a59a6c493f718b6b65ed7ef2a675d (commit)
from 5605f478f2a5682f3410d109c0be233e7527335f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit edac3f78c27a59a6c493f718b6b65ed7ef2a675d
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jan 5 20:20:31 2009 -0800
s3:winbindd: rename fd_event => winbindd_fd_event
It's really confusing to have two versions of 'fd_event'
metze
-----------------------------------------------------------------------
Summary of changes:
source/winbindd/winbindd.c | 26 +++++++++++++-------------
source/winbindd/winbindd.h | 14 +++++---------
source/winbindd/winbindd_proto.h | 8 ++++----
3 files changed, 22 insertions(+), 26 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index ea0864f..139882a 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -415,16 +415,16 @@ static void process_request(struct winbindd_cli_state *state)
/*
* A list of file descriptors being monitored by select in the main processing
- * loop. fd_event->handler is called whenever the socket is readable/writable.
+ * loop. winbindd_fd_event->handler is called whenever the socket is readable/writable.
*/
-static struct fd_event *fd_events = NULL;
+static struct winbindd_fd_event *fd_events = NULL;
-void add_fd_event(struct fd_event *ev)
+void add_fd_event(struct winbindd_fd_event *ev)
{
- struct fd_event *match;
+ struct winbindd_fd_event *match;
- /* only add unique fd_event structs */
+ /* only add unique winbindd_fd_event structs */
for (match=fd_events; match; match=match->next ) {
#ifdef DEVELOPER
@@ -438,17 +438,17 @@ void add_fd_event(struct fd_event *ev)
DLIST_ADD(fd_events, ev);
}
-void remove_fd_event(struct fd_event *ev)
+void remove_fd_event(struct winbindd_fd_event *ev)
{
DLIST_REMOVE(fd_events, ev);
}
/*
- * Handler for fd_events to complete a read/write request, set up by
+ * Handler for winbindd_fd_events to complete a read/write request, set up by
* setup_async_read/setup_async_write.
*/
-static void rw_callback(struct fd_event *event, int flags)
+static void rw_callback(struct winbindd_fd_event *event, int flags)
{
size_t todo;
ssize_t done = 0;
@@ -489,11 +489,11 @@ static void rw_callback(struct fd_event *event, int flags)
}
/*
- * Request an async read/write on a fd_event structure. (*finished) is called
+ * Request an async read/write on a winbindd_fd_event structure. (*finished) is called
* when the request is completed or an error had occurred.
*/
-void setup_async_read(struct fd_event *event, void *data, size_t length,
+void setup_async_read(struct winbindd_fd_event *event, void *data, size_t length,
void (*finished)(void *private_data, bool success),
void *private_data)
{
@@ -507,7 +507,7 @@ void setup_async_read(struct fd_event *event, void *data, size_t length,
event->flags = EVENT_FD_READ;
}
-void setup_async_write(struct fd_event *event, void *data, size_t length,
+void setup_async_write(struct winbindd_fd_event *event, void *data, size_t length,
void (*finished)(void *private_data, bool success),
void *private_data)
{
@@ -826,7 +826,7 @@ void winbind_check_sigterm(bool is_parent)
static void process_loop(void)
{
struct winbindd_cli_state *state;
- struct fd_event *ev;
+ struct winbindd_fd_event *ev;
fd_set r_fds, w_fds;
int maxfd, listen_sock, listen_priv_sock, selret;
struct timeval timeout, ev_timeout;
@@ -920,7 +920,7 @@ static void process_loop(void)
ev = fd_events;
while (ev != NULL) {
- struct fd_event *next = ev->next;
+ struct winbindd_fd_event *next = ev->next;
int flags = 0;
if (FD_ISSET(ev->fd, &r_fds))
flags |= EVENT_FD_READ;
diff --git a/source/winbindd/winbindd.h b/source/winbindd/winbindd.h
index dbc5068..d8e6ec4 100644
--- a/source/winbindd/winbindd.h
+++ b/source/winbindd/winbindd.h
@@ -39,15 +39,11 @@
#define WB_REPLACE_CHAR '_'
-/* bits for fd_event.flags */
-#define EVENT_FD_READ 1
-#define EVENT_FD_WRITE 2
-
-struct fd_event {
- struct fd_event *next, *prev;
+struct winbindd_fd_event {
+ struct winbindd_fd_event *next, *prev;
int fd;
int flags; /* see EVENT_FD_* flags */
- void (*handler)(struct fd_event *fde, int flags);
+ void (*handler)(struct winbindd_fd_event *fde, int flags);
void *data;
size_t length, done;
void (*finished)(void *private_data, bool success);
@@ -65,7 +61,7 @@ struct sid_ctr {
struct winbindd_cli_state {
struct winbindd_cli_state *prev, *next; /* Linked list pointers */
int sock; /* Open socket from client */
- struct fd_event fd_event;
+ struct winbindd_fd_event fd_event;
pid_t pid; /* pid of client */
bool finished; /* Can delete from list */
bool write_extra_data; /* Write extra_data field */
@@ -151,7 +147,7 @@ struct winbindd_child {
struct winbindd_domain *domain;
char *logfilename;
- struct fd_event event;
+ struct winbindd_fd_event event;
struct timed_event *lockout_policy_event;
struct timed_event *machine_password_change_event;
struct winbindd_async_request *requests;
diff --git a/source/winbindd/winbindd_proto.h b/source/winbindd/winbindd_proto.h
index a32dfc1..62fc885 100644
--- a/source/winbindd/winbindd_proto.h
+++ b/source/winbindd/winbindd_proto.h
@@ -55,12 +55,12 @@ bool delete_pipe_opendb( smb_np_struct *p );
struct event_context *winbind_event_context(void);
struct messaging_context *winbind_messaging_context(void);
-void add_fd_event(struct fd_event *ev);
-void remove_fd_event(struct fd_event *ev);
-void setup_async_read(struct fd_event *event, void *data, size_t length,
+void add_fd_event(struct winbindd_fd_event *ev);
+void remove_fd_event(struct winbindd_fd_event *ev);
+void setup_async_read(struct winbindd_fd_event *event, void *data, size_t length,
void (*finished)(void *private_data, bool success),
void *private_data);
-void setup_async_write(struct fd_event *event, void *data, size_t length,
+void setup_async_write(struct winbindd_fd_event *event, void *data, size_t length,
void (*finished)(void *private_data, bool success),
void *private_data);
void request_error(struct winbindd_cli_state *state);
--
Samba Shared Repository
More information about the samba-cvs
mailing list