summaryrefslogtreecommitdiffstats
path: root/src/sbus
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:04 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-05-02 10:58:19 +0200
commitb0d759c9a604add0573c04b1a4e88e1605e1fdc0 (patch)
tree15c83ce34cd254a30cc42c212123b7f194c21677 /src/sbus
parentb9afd88065ecdb9c2cafb2ee767bd61585b31b8f (diff)
downloadsssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.gz
sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.xz
sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.zip
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code (identical to commit a3c8390d19593b1e5277d95bfb4ab206d4785150): grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/sbus')
-rw-r--r--src/sbus/sbus_client.c4
-rw-r--r--src/sbus/sssd_dbus_common.c28
-rw-r--r--src/sbus/sssd_dbus_connection.c64
-rw-r--r--src/sbus/sssd_dbus_server.c68
4 files changed, 82 insertions, 82 deletions
diff --git a/src/sbus/sbus_client.c b/src/sbus/sbus_client.c
index a06b28d2b..fe79f42dc 100644
--- a/src/sbus/sbus_client.c
+++ b/src/sbus/sbus_client.c
@@ -42,13 +42,13 @@ int sbus_client_init(TALLOC_CTX *mem_ctx,
filename = strchr(server_address, '/');
if (filename == NULL) {
- DEBUG(1, ("Unexpected dbus address [%s].\n", server_address));
+ DEBUG(1, "Unexpected dbus address [%s].\n", server_address);
return EIO;
}
ret = check_file(filename, 0, 0, 0600, CHECK_SOCK, NULL, true);
if (ret != EOK) {
- DEBUG(1, ("check_file failed for [%s].\n", filename));
+ DEBUG(1, "check_file failed for [%s].\n", filename);
return EIO;
}
diff --git a/src/sbus/sssd_dbus_common.c b/src/sbus/sssd_dbus_common.c
index d16a763ae..0894036fb 100644
--- a/src/sbus/sssd_dbus_common.c
+++ b/src/sbus/sssd_dbus_common.c
@@ -129,7 +129,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
/* does not exist, allocate new one */
watch = talloc_zero(conn, struct sbus_watch_ctx);
if (!watch) {
- DEBUG(0, ("Out of Memory!\n"));
+ DEBUG(0, "Out of Memory!\n");
return FALSE;
}
watch->conn = conn;
@@ -169,7 +169,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
watch, fd, event_flags,
sbus_watch_handler, watch);
if (!watch->fde) {
- DEBUG(0, ("Failed to set up fd event!\n"));
+ DEBUG(0, "Failed to set up fd event!\n");
talloc_zfree(watch);
return FALSE;
}
@@ -177,11 +177,11 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
DLIST_ADD(conn->watch_list, watch);
talloc_set_destructor((TALLOC_CTX *)watch, watch_destructor);
- DEBUG(8, ("%p/%p (%d), %s/%s (%s)\n",
+ DEBUG(8, "%p/%p (%d), %s/%s (%s)\n",
watch, dbus_watch, fd,
((flags & DBUS_WATCH_READABLE)?"R":"-"),
((flags & DBUS_WATCH_WRITABLE)?"W":"-"),
- enabled?"enabled":"disabled"));
+ enabled?"enabled":"disabled");
return TRUE;
}
@@ -205,7 +205,7 @@ void sbus_toggle_watch(DBusWatch *dbus_watch, void *data)
watch_data = dbus_watch_get_data(dbus_watch);
watch = talloc_get_type(watch_data, struct sbus_watch_ctx);
if (!watch) {
- DEBUG(2, ("[%p] does not carry watch context?!\n", dbus_watch));
+ DEBUG(2, "[%p] does not carry watch context?!\n", dbus_watch);
/* abort ? */
return;
}
@@ -234,11 +234,11 @@ void sbus_toggle_watch(DBusWatch *dbus_watch, void *data)
#endif
}
DEBUG(SSSDBG_TRACE_ALL,
- ("%p/%p (%d), %s/%s (%s)\n",
+ "%p/%p (%d), %s/%s (%s)\n",
watch, dbus_watch, fd,
((flags & DBUS_WATCH_READABLE)?"R":"-"),
((flags & DBUS_WATCH_WRITABLE)?"W":"-"),
- enabled?"enabled":"disabled"));
+ enabled?"enabled":"disabled");
}
/*
@@ -254,10 +254,10 @@ void sbus_remove_watch(DBusWatch *dbus_watch, void *data)
watch_data = dbus_watch_get_data(dbus_watch);
watch = talloc_get_type(watch_data, struct sbus_watch_ctx);
- DEBUG(8, ("%p/%p\n", watch, dbus_watch));
+ DEBUG(8, "%p/%p\n", watch, dbus_watch);
if (!watch) {
- DEBUG(2, ("DBUS trying to remove unknown watch!\n"));
+ DEBUG(2, "DBUS trying to remove unknown watch!\n");
return;
}
@@ -313,7 +313,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
struct sbus_timeout_ctx *timeout;
struct timeval tv;
- DEBUG(8, ("%p\n", dbus_timeout));
+ DEBUG(8, "%p\n", dbus_timeout);
if (!dbus_timeout_get_enabled(dbus_timeout)) {
return TRUE;
@@ -323,7 +323,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
timeout = talloc_zero(conn, struct sbus_timeout_ctx);
if (!timeout) {
- DEBUG(0, ("Out of Memory!\n"));
+ DEBUG(0, "Out of Memory!\n");
return FALSE;
}
timeout->dbus_timeout = dbus_timeout;
@@ -332,7 +332,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
timeout->te = tevent_add_timer(conn->ev, timeout, tv,
sbus_timeout_handler, timeout);
if (!timeout->te) {
- DEBUG(0, ("Failed to set up timeout event!\n"));
+ DEBUG(0, "Failed to set up timeout event!\n");
return FALSE;
}
@@ -349,7 +349,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
*/
void sbus_toggle_timeout(DBusTimeout *dbus_timeout, void *data)
{
- DEBUG(8, ("%p\n", dbus_timeout));
+ DEBUG(8, "%p\n", dbus_timeout);
if (dbus_timeout_get_enabled(dbus_timeout)) {
sbus_add_timeout(dbus_timeout, data);
@@ -366,7 +366,7 @@ void sbus_remove_timeout(DBusTimeout *dbus_timeout, void *data)
{
void *timeout;
- DEBUG(8, ("%p\n", dbus_timeout));
+ DEBUG(8, "%p\n", dbus_timeout);
timeout = dbus_timeout_get_data(dbus_timeout);
diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c
index ccea88e6d..60b06a432 100644
--- a/src/sbus/sssd_dbus_connection.c
+++ b/src/sbus/sssd_dbus_connection.c
@@ -54,15 +54,15 @@ static void sbus_dispatch(struct tevent_context *ev,
conn = talloc_get_type(data, struct sbus_connection);
dbus_conn = conn->dbus.conn;
- DEBUG(SSSDBG_TRACE_ALL, ("dbus conn: %p\n", dbus_conn));
+ DEBUG(SSSDBG_TRACE_ALL, "dbus conn: %p\n", dbus_conn);
if (conn->retries > 0) {
- DEBUG(6, ("SBUS is reconnecting. Deferring.\n"));
+ DEBUG(6, "SBUS is reconnecting. Deferring.\n");
/* Currently trying to reconnect, defer dispatch for 30ms */
tv = tevent_timeval_current_ofs(0, 30);
new_event = tevent_add_timer(ev, conn, tv, sbus_dispatch, conn);
if (new_event == NULL) {
- DEBUG(0,("Could not defer dispatch!\n"));
+ DEBUG(0,"Could not defer dispatch!\n");
}
return;
}
@@ -72,11 +72,11 @@ static void sbus_dispatch(struct tevent_context *ev,
/* Attempt to reconnect automatically */
ret = sbus_auto_reconnect(conn);
if (ret == EOK) {
- DEBUG(1, ("Performing auto-reconnect\n"));
+ DEBUG(1, "Performing auto-reconnect\n");
return;
}
- DEBUG(0, ("Cannot start auto-reconnection.\n"));
+ DEBUG(0, "Cannot start auto-reconnection.\n");
conn->reconnect_callback(conn,
SBUS_RECONNECT_ERROR,
conn->reconnect_pvt);
@@ -85,7 +85,7 @@ static void sbus_dispatch(struct tevent_context *ev,
if ((conn->disconnect) ||
(!dbus_connection_get_is_connected(dbus_conn))) {
- DEBUG(3,("Connection is not open for dispatching.\n"));
+ DEBUG(3,"Connection is not open for dispatching.\n");
/*
* Free the connection object.
* This will invoke the destructor for the connection
@@ -100,7 +100,7 @@ static void sbus_dispatch(struct tevent_context *ev,
*/
ret = dbus_connection_get_dispatch_status(dbus_conn);
if (ret != DBUS_DISPATCH_COMPLETE) {
- DEBUG(9,("Dispatching.\n"));
+ DEBUG(9,"Dispatching.\n");
dbus_connection_dispatch(dbus_conn);
}
@@ -111,7 +111,7 @@ static void sbus_dispatch(struct tevent_context *ev,
if (ret != DBUS_DISPATCH_COMPLETE) {
new_event = tevent_add_timer(ev, conn, tv, sbus_dispatch, conn);
if (new_event == NULL) {
- DEBUG(2,("Could not add dispatch event!\n"));
+ DEBUG(2,"Could not add dispatch event!\n");
/* TODO: Calling exit here is bad */
exit(1);
@@ -139,7 +139,7 @@ static void sbus_conn_wakeup_main(void *data)
/* D-BUS calls this function when it is time to do a dispatch */
te = tevent_add_timer(conn->ev, conn, tv, sbus_dispatch, conn);
if (te == NULL) {
- DEBUG(2,("Could not add dispatch event!\n"));
+ DEBUG(2,"Could not add dispatch event!\n");
/* TODO: Calling exit here is bad */
exit(1);
}
@@ -162,7 +162,7 @@ int sbus_init_connection(TALLOC_CTX *ctx,
struct sbus_connection *conn;
int ret;
- DEBUG(SSSDBG_TRACE_FUNC,("Adding connection %p\n", dbus_conn));
+ DEBUG(SSSDBG_TRACE_FUNC,"Adding connection %p\n", dbus_conn);
conn = talloc_zero(ctx, struct sbus_connection);
conn->ev = ev;
@@ -204,7 +204,7 @@ static int sbus_conn_set_fns(struct sbus_connection *conn)
sbus_toggle_watch,
conn, NULL);
if (!dbret) {
- DEBUG(2,("Error setting up D-BUS connection watch functions\n"));
+ DEBUG(2,"Error setting up D-BUS connection watch functions\n");
return EIO;
}
@@ -215,7 +215,7 @@ static int sbus_conn_set_fns(struct sbus_connection *conn)
sbus_toggle_timeout,
conn, NULL);
if (!dbret) {
- DEBUG(2,("Error setting up D-BUS server timeout functions\n"));
+ DEBUG(2,"Error setting up D-BUS server timeout functions\n");
/* FIXME: free resources ? */
return EIO;
}
@@ -251,8 +251,8 @@ int sbus_new_connection(TALLOC_CTX *ctx, struct tevent_context *ev,
/* Open a shared D-BUS connection to the address */
dbus_conn = dbus_connection_open(address, &dbus_error);
if (!dbus_conn) {
- DEBUG(1, ("Failed to open connection: name=%s, message=%s\n",
- dbus_error.name, dbus_error.message));
+ DEBUG(1, "Failed to open connection: name=%s, message=%s\n",
+ dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
return EIO;
}
@@ -296,8 +296,8 @@ int sbus_default_connection_destructor(void *ctx)
struct sbus_connection *conn;
conn = talloc_get_type(ctx, struct sbus_connection);
- DEBUG(SSSDBG_TRACE_FUNC, ("Invoking default destructor on connection %p\n",
- conn->dbus.conn));
+ DEBUG(SSSDBG_TRACE_FUNC, "Invoking default destructor on connection %p\n",
+ conn->dbus.conn);
if (conn->connection_type == SBUS_CONN_TYPE_PRIVATE) {
/* Private connections must be closed explicitly */
dbus_connection_close(conn->dbus.conn);
@@ -307,7 +307,7 @@ int sbus_default_connection_destructor(void *ctx)
}
else {
/* Critical Error! */
- DEBUG(1,("Critical Error, connection_type is neither shared nor private!\n"));
+ DEBUG(1,"Critical Error, connection_type is neither shared nor private!\n");
return -1;
}
@@ -334,7 +334,7 @@ void sbus_disconnect (struct sbus_connection *conn)
return;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Disconnecting %p\n", conn->dbus.conn));
+ DEBUG(SSSDBG_TRACE_FUNC, "Disconnecting %p\n", conn->dbus.conn);
/*******************************
* Referencing conn->dbus.conn */
@@ -374,7 +374,7 @@ void sbus_disconnect (struct sbus_connection *conn)
/* Unreferenced conn->dbus_conn *
******************************/
- DEBUG(SSSDBG_TRACE_FUNC ,("Disconnected %p\n", conn->dbus.conn));
+ DEBUG(SSSDBG_TRACE_FUNC ,"Disconnected %p\n", conn->dbus.conn);
}
static int sbus_reply_internal_error(DBusMessage *message,
@@ -410,7 +410,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn,
intf_p = talloc_get_type(user_data, struct sbus_interface_p);
method = dbus_message_get_member(message);
- DEBUG(9, ("Received SBUS method [%s]\n", method));
+ DEBUG(9, "Received SBUS method [%s]\n", method);
path = dbus_message_get_path(message);
msg_interface = dbus_message_get_interface(message);
@@ -437,7 +437,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn,
if (!found) {
/* Reply DBUS_ERROR_UNKNOWN_METHOD */
- DEBUG(1, ("No matching method found for %s.\n", method));
+ DEBUG(1, "No matching method found for %s.\n", method);
reply = dbus_message_new_error(message, DBUS_ERROR_UNKNOWN_METHOD, NULL);
sbus_conn_send_reply(intf_p->conn, reply);
dbus_message_unref(reply);
@@ -484,7 +484,7 @@ int sbus_conn_add_interface(struct sbus_connection *conn,
path = intf->path;
if (path_in_interface_list(conn->intf_list, path)) {
- DEBUG(0, ("Cannot add method context with identical path.\n"));
+ DEBUG(0, "Cannot add method context with identical path.\n");
return EINVAL;
}
@@ -500,7 +500,7 @@ int sbus_conn_add_interface(struct sbus_connection *conn,
dbret = dbus_connection_register_object_path(conn->dbus.conn,
path, &intf->vtable, intf_p);
if (!dbret) {
- DEBUG(0, ("Could not register object path to the connection.\n"));
+ DEBUG(0, "Could not register object path to the connection.\n");
return ENOMEM;
}
@@ -561,12 +561,12 @@ static void sbus_reconnect(struct tevent_context *ev,
conn = talloc_get_type(data, struct sbus_connection);
dbus_error_init(&dbus_error);
- DEBUG(3, ("Making reconnection attempt %d to [%s]\n",
- conn->retries, conn->address));
+ DEBUG(3, "Making reconnection attempt %d to [%s]\n",
+ conn->retries, conn->address);
conn->dbus.conn = dbus_connection_open(conn->address, &dbus_error);
if (conn->dbus.conn) {
/* We successfully reconnected. Set up mainloop integration. */
- DEBUG(3, ("Reconnected to [%s]\n", conn->address));
+ DEBUG(3, "Reconnected to [%s]\n", conn->address);
ret = sbus_conn_set_fns(conn);
if (ret != EOK) {
dbus_connection_unref(conn->dbus.conn);
@@ -581,7 +581,7 @@ static void sbus_reconnect(struct tevent_context *ev,
&iter->intf->vtable,
iter);
if (!dbret) {
- DEBUG(0, ("Could not register object path.\n"));
+ DEBUG(0, "Could not register object path.\n");
dbus_connection_unref(conn->dbus.conn);
goto failed;
}
@@ -602,8 +602,8 @@ static void sbus_reconnect(struct tevent_context *ev,
failed:
/* Reconnection failed, try again in a few seconds */
- DEBUG(1, ("Failed to open connection: name=%s, message=%s\n",
- dbus_error.name, dbus_error.message));
+ DEBUG(1, "Failed to open connection: name=%s, message=%s\n",
+ dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
conn->retries++;
@@ -708,7 +708,7 @@ int sbus_conn_send(struct sbus_connection *conn,
dbus_conn = sbus_get_connection(conn);
if (!dbus_conn) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("D-BUS not connected\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "D-BUS not connected\n");
return ENOTCONN;
}
@@ -720,7 +720,7 @@ int sbus_conn_send(struct sbus_connection *conn,
* Critical Failure
* Insufficient memory to send message
*/
- DEBUG(0, ("D-BUS send failed.\n"));
+ DEBUG(0, "D-BUS send failed.\n");
return ENOMEM;
}
@@ -733,7 +733,7 @@ int sbus_conn_send(struct sbus_connection *conn,
* Critical Failure
* Insufficient memory to create pending call notify
*/
- DEBUG(0, ("D-BUS send failed.\n"));
+ DEBUG(0, "D-BUS send failed.\n");
dbus_pending_call_cancel(pending_reply);
dbus_pending_call_unref(pending_reply);
return ENOMEM;
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c
index 3ada25b61..0278137f9 100644
--- a/src/sbus/sssd_dbus_server.c
+++ b/src/sbus/sssd_dbus_server.c
@@ -45,25 +45,25 @@ static void sbus_server_init_new_connection(DBusServer *dbus_server,
struct sbus_connection *conn;
int ret;
- DEBUG(5,("Entering.\n"));
+ DEBUG(5,"Entering.\n");
server = talloc_get_type(data, struct sbus_connection);
if (!server) {
return;
}
- DEBUG(5,("Adding connection %p.\n", dbus_conn));
+ DEBUG(5,"Adding connection %p.\n", dbus_conn);
ret = sbus_init_connection(server, server->ev,
dbus_conn, server->server_intf,
SBUS_CONN_TYPE_PRIVATE, &conn);
if (ret != 0) {
dbus_connection_close(dbus_conn);
- DEBUG(5,("Closing connection (failed setup)"));
+ DEBUG(5,"Closing connection (failed setup)");
return;
}
dbus_connection_ref(dbus_conn);
- DEBUG(5,("Got a connection\n"));
+ DEBUG(5,"Got a connection\n");
/*
* Initialize connection-specific features
@@ -75,7 +75,7 @@ static void sbus_server_init_new_connection(DBusServer *dbus_server,
*/
ret = server->srv_init_fn(conn, server->srv_init_data);
if (ret != EOK) {
- DEBUG(1,("Initialization failed!\n"));
+ DEBUG(1,"Initialization failed!\n");
dbus_connection_close(dbus_conn);
talloc_zfree(conn);
}
@@ -97,8 +97,8 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
{
errno_t ret;
- DEBUG(7, ("Symlinking the dbus path %s to a link %s\n",
- filename, symlink_filename));
+ DEBUG(7, "Symlinking the dbus path %s to a link %s\n",
+ filename, symlink_filename);
errno = 0;
ret = symlink(filename, symlink_filename);
if (ret != 0 && errno == EEXIST) {
@@ -107,8 +107,8 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
ret = unlink(symlink_filename);
if (ret != 0) {
ret = errno;
- DEBUG(1, ("Cannot remove old symlink: [%d][%s].\n",
- ret, strerror(ret)));
+ DEBUG(1, "Cannot remove old symlink: [%d][%s].\n",
+ ret, strerror(ret));
return EIO;
}
errno = 0;
@@ -117,8 +117,8 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
if (ret != 0) {
ret = errno;
- DEBUG(1, ("symlink() failed on file '%s': [%d][%s].\n",
- filename, ret, strerror(ret)));
+ DEBUG(1, "symlink() failed on file '%s': [%d][%s].\n",
+ filename, ret, strerror(ret));
return EIO;
}
@@ -137,28 +137,28 @@ remove_socket_symlink(const char *symlink_name)
numread = readlink(symlink_name, target, PATH_MAX-1);
if (numread < 0) {
ret = errno;
- DEBUG(2, ("readlink failed [%d]: %s\n", ret, strerror(ret)));
+ DEBUG(2, "readlink failed [%d]: %s\n", ret, strerror(ret));
return ret;
}
target[numread] = '\0';
- DEBUG(9, ("The symlink points to [%s]\n", target));
+ DEBUG(9, "The symlink points to [%s]\n", target);
/* We can only remove the symlink if it points to a socket with
* the same PID */
ret = snprintf(pidpath, PATH_MAX, "%s.%lu",
symlink_name, (unsigned long) getpid());
if (ret < 0) {
- DEBUG(2, ("snprintf failed"));
+ DEBUG(2, "snprintf failed");
return EIO;
} else if (ret >= PATH_MAX) {
- DEBUG(2, ("path too long?!?!\n"));
+ DEBUG(2, "path too long?!?!\n");
return EIO;
}
- DEBUG(9, ("The path including our pid is [%s]\n", pidpath));
+ DEBUG(9, "The path including our pid is [%s]\n", pidpath);
if (strcmp(pidpath, target) != 0) {
- DEBUG(4, ("Will not remove symlink, seems to be owned by "
- "another process\n"));
+ DEBUG(4, "Will not remove symlink, seems to be owned by "
+ "another process\n");
return EOK;
}
@@ -166,12 +166,12 @@ remove_socket_symlink(const char *symlink_name)
if (ret != 0) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("unlink failed to remove [%s] [%d]: %s\n",
- symlink_name, ret, strerror(ret)));
+ "unlink failed to remove [%s] [%d]: %s\n",
+ symlink_name, ret, strerror(ret));
return ret;
}
- DEBUG(9, ("Removed the symlink\n"));
+ DEBUG(9, "Removed the symlink\n");
return EOK;
}
@@ -216,8 +216,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
dbus_error_init(&dbus_error);
dbus_server = dbus_server_listen(socket_address, &dbus_error);
if (!dbus_server) {
- DEBUG(1,("dbus_server_listen failed! (name=%s, message=%s)\n",
- dbus_error.name, dbus_error.message));
+ DEBUG(1,"dbus_server_listen failed! (name=%s, message=%s)\n",
+ dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
ret = EIO;
goto done;
@@ -225,7 +225,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
filename = strchr(socket_address, '/');
if (filename == NULL) {
- DEBUG(1, ("Unexpected dbus address [%s].\n", socket_address));
+ DEBUG(1, "Unexpected dbus address [%s].\n", socket_address);
ret = EIO;
goto done;
}
@@ -233,15 +233,15 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
if (use_symlink) {
symlink_filename = strchr(address, '/');
if (symlink_filename == NULL) {
- DEBUG(1, ("Unexpected dbus address [%s].\n", address));
+ DEBUG(1, "Unexpected dbus address [%s].\n", address);
ret = EIO;
goto done;
}
ret = create_socket_symlink(filename, symlink_filename);
if (ret != EOK) {
- DEBUG(1, ("Could not create symlink [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(1, "Could not create symlink [%d]: %s\n",
+ ret, strerror(ret));
ret = EIO;
goto done;
}
@@ -251,7 +251,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
* the socket */
ret = check_file(filename, 0, 0, -1, CHECK_SOCK, &stat_buf, true);
if (ret != EOK) {
- DEBUG(1, ("check_file failed for [%s].\n", filename));
+ DEBUG(1, "check_file failed for [%s].\n", filename);
ret = EIO;
goto done;
}
@@ -259,15 +259,15 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
if ((stat_buf.st_mode & ~S_IFMT) != 0600) {
ret = chmod(filename, 0600);
if (ret != EOK) {
- DEBUG(1, ("chmod failed for [%s]: [%d][%s].\n", filename, errno,
- strerror(errno)));
+ DEBUG(1, "chmod failed for [%s]: [%d][%s].\n", filename, errno,
+ strerror(errno));
ret = EIO;
goto done;
}
}
tmp = dbus_server_get_address(dbus_server);
- DEBUG(SSSDBG_TRACE_FUNC, ("D-BUS Server listening on %s\n", tmp));
+ DEBUG(SSSDBG_TRACE_FUNC, "D-BUS Server listening on %s\n", tmp);
free(tmp);
server = talloc_zero(tmp_ctx, struct sbus_connection);
@@ -305,7 +305,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
sbus_toggle_watch,
server, NULL);
if (!dbret) {
- DEBUG(4, ("Error setting up D-BUS server watch functions\n"));
+ DEBUG(4, "Error setting up D-BUS server watch functions\n");
ret = EIO;
goto done;
}
@@ -317,7 +317,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
sbus_toggle_timeout,
server, NULL);
if (!dbret) {
- DEBUG(4,("Error setting up D-BUS server timeout functions\n"));
+ DEBUG(4,"Error setting up D-BUS server timeout functions\n");
dbus_server_set_watch_functions(server->dbus.server,
NULL, NULL, NULL, NULL, NULL);
ret = EIO;
@@ -345,7 +345,7 @@ static int sbus_server_destructor(void *ctx)
if (server->symlink) {
ret = remove_socket_symlink(server->symlink);
if (ret != EOK) {
- DEBUG(3, ("Could not remove the server symlink\n"));
+ DEBUG(3, "Could not remove the server symlink\n");
}
}