Kaydet (Commit) a4392a60 authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

Fix COMAR processing messages sent to other services in eavesdropping mode of DBUS

üst b61d87fa
......@@ -64,6 +64,7 @@
#endif
extern char *config_server_address;
extern char *config_unique_address;
extern char *config_service_name;
extern char *config_interface;
extern char *config_dir_data;
......
......@@ -38,6 +38,9 @@
//! D-Bus socket file
char *config_server_address = DBUS_SERVER_ADDRESS;
//! D-Bus unique address
char *config_unique_address;
//! D-Bus service name
char *config_service_name = DBUS_SERVICE_NAME;
......
......@@ -196,6 +196,10 @@ filter_func(DBusConnection *conn, DBusMessage *bus_msg, void *data)
PyObject *py_args = pydbus_import(bus_msg);
if (!dbus_message_has_destination(bus_msg, config_unique_address)) {
return DBUS_HANDLER_RESULT_HANDLED;
}
switch (dbus_message_get_type(bus_msg)) {
case DBUS_MESSAGE_TYPE_METHOD_CALL:
if (my_proc.nr_children > MAX_PROC) {
......@@ -320,6 +324,7 @@ loop_exec()
return -1;
}
config_unique_address = dbus_bus_get_unique_name(bus_conn);
log_debug("Connected to D-Bus, unique id is %s\n", dbus_bus_get_unique_name(bus_conn));
// Request a name (example: com.server.test)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment