summaryrefslogtreecommitdiff
path: root/src/http.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-25 17:59:55 +0300
committerinfirit <[email protected]>2015-09-07 15:54:58 +0200
commitdadcc6243c6f3a7bcf7aba443816c50e987fc6e4 (patch)
tree07295bf1872b9171c362c3aba644804ed917ac5e /src/http.c
parent7d6ade70a6012a72f6d98d4f86b73a41dfbcb28a (diff)
downloadmate-user-share-dadcc6243c6f3a7bcf7aba443816c50e987fc6e4.tar.bz2
mate-user-share-dadcc6243c6f3a7bcf7aba443816c50e987fc6e4.tar.xz
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
Diffstat (limited to 'src/http.c')
-rw-r--r--src/http.c44
1 files changed, 2 insertions, 42 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;
}