summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http.c44
-rw-r--r--src/user_share.c2
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 <glib.h>
#include <glib/gi18n.h>
#include <X11/Xlib.h>
-#include <dbus/dbus.h>
#include <gio/gio.h>
@@ -54,8 +53,6 @@
#define GSETTINGS_SCHEMA "org.mate.FileSharing"
-static char *dbus_session_id;
-
static pid_t httpd_pid = 0;
static int
@@ -151,41 +148,6 @@ get_share_name (void)
}
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)
{
char *dirname;
@@ -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 <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
#endif /* HAVE_BLUETOOTH */
#include <gio/gio.h>