diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2008-10-28 09:18:43 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-11-03 10:12:29 -0500 |
commit | f0a8bcff01cafc5fa846ef88625df3ee656961f3 (patch) | |
tree | 06fb2d5b01b7039c2ee05ec3f8060815ab409245 /server | |
parent | 0d3fad824641eabd2e856f7b4aa7828367bba5fa (diff) | |
download | sssd-f0a8bcff01cafc5fa846ef88625df3ee656961f3.tar.gz sssd-f0a8bcff01cafc5fa846ef88625df3ee656961f3.tar.bz2 sssd-f0a8bcff01cafc5fa846ef88625df3ee656961f3.zip |
Cleaning up improper whitespace
Diffstat (limited to 'server')
-rw-r--r-- | server/dbus/sssd_dbus_common.c | 2 | ||||
-rw-r--r-- | server/dbus/sssd_dbus_connection.c | 14 | ||||
-rw-r--r-- | server/dbus/sssd_dbus_server.c | 14 | ||||
-rw-r--r-- | server/monitor.c | 2 | ||||
-rw-r--r-- | server/util/memory.c | 8 |
5 files changed, 15 insertions, 25 deletions
diff --git a/server/dbus/sssd_dbus_common.c b/server/dbus/sssd_dbus_common.c index cd6e1f9a..c7af4b0b 100644 --- a/server/dbus/sssd_dbus_common.c +++ b/server/dbus/sssd_dbus_common.c @@ -21,7 +21,7 @@ struct timeval _dbus_timeout_get_interval_tv(int interval) { */ void remove_watch(DBusWatch *watch, void *data) { struct fd_event *fde; - + DEBUG(2, ("%lX\n", watch)); fde = talloc_get_type(dbus_watch_get_data(watch), struct fd_event); diff --git a/server/dbus/sssd_dbus_connection.c b/server/dbus/sssd_dbus_connection.c index 991a28fe..0033ab87 100644 --- a/server/dbus/sssd_dbus_connection.c +++ b/server/dbus/sssd_dbus_connection.c @@ -55,7 +55,7 @@ static void do_dispatch(struct event_context *ev, DEBUG(0,("Critical Error, connection_type is neither shared nor private!\n")) } dbus_connection_set_data(conn,connection_type_slot, NULL, NULL); - + return; } @@ -67,7 +67,7 @@ static void do_dispatch(struct event_context *ev, DEBUG(2,("Dispatching.\n")); dbus_connection_dispatch(conn); } - + /* If other dispatches are waiting, queue up the do_dispatch function * for the next loop. */ @@ -76,7 +76,7 @@ static void do_dispatch(struct event_context *ev, new_event = event_add_timed(ev, ev, tv, do_dispatch, conn); if (new_event == NULL) { DEBUG(0,("Could not add dispatch event!\n")); - + /* TODO: Calling exit here is bad */ exit(1); } @@ -140,7 +140,7 @@ static dbus_bool_t add_connection_watch(DBusWatch *watch, void *data) if (event_flags == 0) return FALSE; - + DEBUG(2,("%lX: %d, %d=%s\n", watch, conn_w_ctx->fd, event_flags, event_flags==EVENT_FD_READ?"READ":"WRITE")); /* Add the file descriptor to the event loop */ @@ -317,7 +317,7 @@ int sssd_new_dbus_connection(struct sssd_dbus_ctx *ctx, const char *address, int ret; dbus_error_init(&dbus_error); - + /* Open a shared D-BUS connection to the address */ dbus_conn = dbus_connection_open(address, &dbus_error); if (!dbus_conn) { @@ -325,12 +325,12 @@ int sssd_new_dbus_connection(struct sssd_dbus_ctx *ctx, const char *address, dbus_error.name, dbus_error.message)); return EIO; } - + /* Allocate or increase the reference count of connection_type_slot */ if (!dbus_connection_allocate_data_slot(&connection_type_slot)) { return ENOMEM; } - + connection_type = DBUS_CONNECTION_TYPE_SHARED; dbus_connection_set_data(dbus_conn, connection_type_slot, &connection_type, NULL); diff --git a/server/dbus/sssd_dbus_server.c b/server/dbus/sssd_dbus_server.c index c6bc7db9..b489d704 100644 --- a/server/dbus/sssd_dbus_server.c +++ b/server/dbus/sssd_dbus_server.c @@ -48,16 +48,6 @@ struct dbus_server_timeout_context { static int dbus_server_destructor(void **server); -void remove_server_watch(DBusWatch *watch, void *data) { - struct fd_event *fde; - - DEBUG(2, ("%lX\n", watch)); - fde = talloc_get_type(dbus_watch_get_data(watch), struct fd_event); - - /* Freeing the event object will remove it from the event loop */ - talloc_free(fde); -} - /* * dbus_server_read_write_handler * Callback for D-BUS to handle messages on a file-descriptor @@ -261,7 +251,7 @@ static void new_connection_callback(DBusServer *server, DBusConnection *conn, dbus_connection_close(conn); return; } - + connection_type = talloc(dst_ctx, int); *connection_type = DBUS_CONNECTION_TYPE_PRIVATE; dbus_connection_set_data(conn, connection_type_slot, connection_type, talloc_free); @@ -347,7 +337,7 @@ int sssd_new_dbus_server(struct sssd_dbus_ctx *ctx, const char *address) dt_ctx, NULL); if (!dbret) { DEBUG(0,("Error setting up D-BUS server timeout functions")); - dbus_server_set_watch_functions(dt_ctx->server, NULL, NULL, NULL, NULL, NULL); + dbus_server_set_watch_functions(dt_ctx->server, NULL, NULL, NULL, NULL, NULL); talloc_free(dt_ctx->server_talloc); dt_ctx->server = NULL; return EIO; diff --git a/server/monitor.c b/server/monitor.c index f651b79f..7a877cdd 100644 --- a/server/monitor.c +++ b/server/monitor.c @@ -222,7 +222,7 @@ int start_monitor(TALLOC_CTX *mem_ctx, set_tasks_checker(srv); } - + /* Initialize D-BUS Server * The monitor will act as a D-BUS server for all * SSSD processes */ diff --git a/server/util/memory.c b/server/util/memory.c index e73fd016..cf653260 100644 --- a/server/util/memory.c +++ b/server/util/memory.c @@ -9,18 +9,18 @@ */ TALLOC_CTX *talloc_takeover(TALLOC_CTX *mem_ctx, void *ptr, int (*destructor)(void **)) { void **handle; - + if (ptr == NULL) { return NULL; } - + handle = talloc_named_const(mem_ctx, sizeof(void *), "void *"); if (handle == NULL) { return NULL; } - + *handle = ptr; talloc_set_destructor(handle,destructor); - + return handle; }
\ No newline at end of file |