From cddd82bbde992ffaf78384acfdf86c8d950bb9da Mon Sep 17 00:00:00 2001 From: Monsta Date: Tue, 25 Aug 2015 17:59:55 +0300 Subject: some cleanup from upstream https://git.gnome.org/browse/gnome-user-share/commit/?id=447db6a8eaf551fd9de53d600885847d1e1eb0ac https://git.gnome.org/browse/gnome-user-share/commit/?id=032d88e1c4e89bef92540b3e613f5ad7baa6bedb https://git.gnome.org/browse/gnome-user-share/commit/?id=2bbc6384cb0d8a85dcf0208ec5d75d28e2d89049 --- src/http.c | 44 ++------------------------------------------ src/user_share.c | 2 -- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/src/http.c b/src/http.c index 36d058a..c3dea6b 100644 --- a/src/http.c +++ b/src/http.c @@ -26,7 +26,6 @@ #include #include #include -#include #include @@ -54,8 +53,6 @@ #define GSETTINGS_SCHEMA "org.mate.FileSharing" -static char *dbus_session_id; - static pid_t httpd_pid = 0; static int @@ -150,41 +147,6 @@ get_share_name (void) return name; } -static void -init_dbus() { - /* The only use we make of D-BUS is to fetch the session BUS ID so we can export - * it via mDNS, so we connect and then immediately disconnect. If we were using - * the D-BUS session BUS for something persistent, the following code should use - * dbus_bus_get() and skip the shutdown. (Avahi uses the D-BUS _system_ bus - * internally.) - */ - - DBusError derror; - DBusConnection *connection; - - dbus_error_init(&derror); - - connection = dbus_bus_get_private(DBUS_BUS_SESSION, &derror); - if (connection == NULL) { - g_printerr("Failed to connect to session bus: %s", derror.message); - dbus_error_free(&derror); - return; - } - - dbus_session_id = dbus_bus_get_id(connection, &derror); - if (dbus_session_id == NULL) { - /* This can happen if the D-BUS library has been upgraded to 1.1, but the - * user's session hasn't yet been restarted - */ - g_printerr("Failed to get session BUS ID: %s", derror.message); - dbus_error_free(&derror); - } - - dbus_connection_set_exit_on_disconnect(connection, FALSE); - dbus_connection_close(connection); - dbus_connection_unref(connection); -} - static void ensure_conf_dir (void) { @@ -222,7 +184,7 @@ static const char *known_httpd_locations [] = { }; static char* -get_httpd_program () +get_httpd_program (void) { int i; @@ -248,7 +210,7 @@ static const char *known_httpd_modules_locations [] = { }; static gchar* -get_httpd_modules_path () +get_httpd_modules_path (void) { int i; @@ -464,8 +426,6 @@ http_down (void) gboolean http_init (void) { - init_dbus(); - return TRUE; } diff --git a/src/user_share.c b/src/user_share.c index d210ce6..59e0375 100644 --- a/src/user_share.c +++ b/src/user_share.c @@ -41,8 +41,6 @@ #include "obexftp.h" #include "obexpush.h" -#include -#include #endif /* HAVE_BLUETOOTH */ #include -- cgit v1.2.1