summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-25 17:59:55 +0300
committermonsta <[email protected]>2015-09-25 15:55:44 +0300
commitcddd82bbde992ffaf78384acfdf86c8d950bb9da (patch)
tree90aff2144cdf76efa2bcfc3db76740425767b5da
parent973b934698ef3113e03411c41fe14b896d3bc194 (diff)
downloadmate-user-share-cddd82bbde992ffaf78384acfdf86c8d950bb9da.tar.bz2
mate-user-share-cddd82bbde992ffaf78384acfdf86c8d950bb9da.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
-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>