Merge remote-tracking branch 'AsamK/master' into master

This commit is contained in:
user-invalid 2020-09-20 17:32:45 +02:00
commit 7aa31842dd
91 changed files with 3917 additions and 1594 deletions

View file

@ -6,8 +6,9 @@ import net.sourceforge.argparse4j.inf.Subparser;
import org.asamk.signal.DbusReceiveMessageHandler;
import org.asamk.signal.JsonDbusReceiveMessageHandler;
import org.asamk.signal.dbus.DbusSignalImpl;
import org.asamk.signal.manager.Manager;
import org.freedesktop.dbus.DBusConnection;
import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import java.io.IOException;
@ -41,15 +42,15 @@ public class DaemonCommand implements LocalCommand {
DBusConnection conn = null;
try {
try {
int busType;
DBusConnection.DBusBusType busType;
String busName;
if (ns.getBoolean("system")) {
busType = DBusConnection.SYSTEM;
busType = DBusConnection.DBusBusType.SYSTEM;
} else {
busType = DBusConnection.SESSION;
busType = DBusConnection.DBusBusType.SESSION;
}
conn = DBusConnection.getConnection(busType);
conn.exportObject(SIGNAL_OBJECTPATH, m);
conn.exportObject(SIGNAL_OBJECTPATH, new DbusSignalImpl(m));
busName = ns.getString("busname");
if (busName == null) {
conn.requestBusName(SIGNAL_BUSNAME);