tools: fix signal type in service test

The signal definition is:

    <signal name="StateChanged">
      <arg name="old" type="i" />
      <arg name="new" type="i" />
      <arg name="reason" type="u" />
    </signal>

So the first two arguments need to be adjusted.

Without this change, the test was failing for me:

    (/build/source/tools/tests/.libs/lt-test-stub:77030): GLib-GObject-CRITICAL **: 15:05:35.276: ../gobject/gsignal.c:3167: value for 'gint' parameter 0 for signal "state-changed" is of type 'guint'
This commit is contained in:
Alyssa Ross
2021-06-17 15:06:41 +00:00
committed by Aleksander Morgado
parent b100189f49
commit a8f086bfb3
2 changed files with 5 additions and 5 deletions

View File

@@ -339,7 +339,7 @@ class Modem(ExportedObj):
def PropertiesChanged(self, changed):
pass
@dbus.service.signal(IFACE_MODEM, signature='uuu')
@dbus.service.signal(IFACE_MODEM, signature='iiu')
def StateChanged(self, old_state, new_state, reason):
pass
@@ -406,7 +406,7 @@ class ObjectManager(dbus.service.Object):
self.modem = Modem(self.bus, add_sim, iccid)
return dbus.ObjectPath(self.modem.path)
@dbus.service.method(IFACE_TEST, in_signature='uuu', out_signature='')
@dbus.service.method(IFACE_TEST, in_signature='iiu', out_signature='')
def EmitStateChanged(self, old_state, new_state, reason):
if self.modem is not None:
self.modem.StateChanged(old_state, new_state, reason)