Skip to content
Permalink
Browse files
[usb-moded] Use dbus_gmain instead of dbus-glib. JB#51115
Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
  • Loading branch information
Thaodan committed Sep 23, 2020
1 parent 34a9726 commit 384f99243500d0556061b5b144e32fcfb07afcf8
Showing with 14 additions and 7 deletions.
  1. +3 −0 .gitmodules
  2. +1 −1 Makefile.am
  3. +3 −2 configure.ac
  4. +1 −0 dbus-gmain
  5. +0 −1 rpm/usb-moded.spec
  6. +3 −1 src/Makefile.am
  7. +3 −2 src/usb_moded-dbus.c
@@ -0,0 +1,3 @@
[submodule "dbus-gmain"]
path = dbus-gmain
url = https://github.com/sailfishos-mirror/dbus-glib.git
@@ -1,4 +1,4 @@
SUBDIRS = src
SUBDIRS = dbus-gmain src

EXTRA_DIST = \
autogen.sh \
@@ -1,5 +1,6 @@
AC_INIT([usb_moded], [0.86.0+mer47])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_EXTRA_RECURSIVE_TARGETS([dbus-gmain])

AM_CONFIG_HEADER([config.h])

@@ -102,7 +103,6 @@ PKG_CHECK_MODULES([DBUS], dbus-1 >= 1.8)
PKG_CHECK_MODULES([GLIB], glib-2.0 >= 2.24.0)
PKG_CHECK_MODULES([USB_MODED], [
glib-2.0 >= 2.24.0
dbus-glib-1 >= 0.78
gobject-2.0 >= 2.16.6
gio-2.0
libudev
@@ -138,6 +138,7 @@ AC_SUBST(USB_MODED_CFLAGS)

AC_CONFIG_FILES([
Makefile
dbus-gmain/Makefile
src/Makefile
usb_moded.pc
docs/usb_moded-doxygen.conf
Submodule dbus-gmain added at d42176
@@ -8,7 +8,6 @@ Source0: %{name}-%{version}.tar.bz2
Source1: usb_moded.conf

BuildRequires: pkgconfig(dbus-1) >= 1.8
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libkmod)
@@ -12,7 +12,9 @@ usb_moded_LDFLAGS = \
-Wl,--as-needed

usb_moded_LDADD = \
$(USB_MODED_LIBS)
$(USB_MODED_LIBS) \
$(DBUS_LIBS) \
$(top_srcdir)/dbus-gmain/libdbus-gmain.la

usb_moded_SOURCES = \
usb_moded.c \
@@ -15,6 +15,7 @@
* @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
* @author Andrew den Exter <andrew.den.exter@jolla.com>
* @author Andrew den Exter <andrew.den.exter@jollamobile.com>
* @author Björn Bidar <bjorn.bidar@jolla.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Lesser GNU General Public License
@@ -44,7 +45,7 @@
#include <string.h>
#include <sys/stat.h>

#include <dbus/dbus-glib-lowlevel.h>
#include <dbus-gmain/dbus-gmain.h>

#ifdef SAILFISH_ACCESS_CONTROL
# include <sailfishaccesscontrol.h>
@@ -1366,7 +1367,7 @@ gboolean umdbus_init_connection(void)
usbmoded_probe_init_done();

/* Connect D-Bus to the mainloop */
dbus_connection_setup_with_g_main(umdbus_connection, NULL);
dbus_gmain_set_up_connection(umdbus_connection, NULL);

/* everything went fine */
status = TRUE;

0 comments on commit 384f992

Please sign in to comment.