diff options
Diffstat (limited to 'swaybar/tray/sni.c')
-rw-r--r-- | swaybar/tray/sni.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/swaybar/tray/sni.c b/swaybar/tray/sni.c index 7e09f414..401a0091 100644 --- a/swaybar/tray/sni.c +++ b/swaybar/tray/sni.c | |||
@@ -71,17 +71,13 @@ static void reply_icon(DBusPendingCall *pending, void *_data) { | |||
71 | 71 | ||
72 | // Each if here checks the types above before recursing | 72 | // Each if here checks the types above before recursing |
73 | if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) { | 73 | if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) { |
74 | sway_log(L_ERROR, "Relpy type incorrect"); | 74 | sway_log(L_ERROR, "Icon relpy type incorrect"); |
75 | sway_log(L_ERROR, "Should be \"v\", is \"%s\"", | ||
76 | dbus_message_iter_get_signature(&iter)); | ||
77 | goto bail; | 75 | goto bail; |
78 | } | 76 | } |
79 | dbus_message_iter_recurse(&iter, &variant); | 77 | dbus_message_iter_recurse(&iter, &variant); |
80 | 78 | ||
81 | if (strcmp("a(iiay)", dbus_message_iter_get_signature(&variant)) != 0) { | 79 | if (dbus_message_iter_check_signature(&variant, "a(iiay)")) { |
82 | sway_log(L_ERROR, "Relpy type incorrect"); | 80 | sway_log(L_ERROR, "Icon relpy type incorrect"); |
83 | sway_log(L_ERROR, "Should be \"a(iiay)\", is \"%s\"", | ||
84 | dbus_message_iter_get_signature(&variant)); | ||
85 | goto bail; | 81 | goto bail; |
86 | } | 82 | } |
87 | 83 | ||
@@ -237,18 +233,14 @@ static void reply_icon_name(DBusPendingCall *pending, void *_data) { | |||
237 | 233 | ||
238 | dbus_message_iter_init(reply, &iter); | 234 | dbus_message_iter_init(reply, &iter); |
239 | if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) { | 235 | if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) { |
240 | sway_log(L_ERROR, "Relpy type incorrect"); | 236 | sway_log(L_ERROR, "Icon name relpy type incorrect"); |
241 | sway_log(L_ERROR, "Should be \"v\", is \"%s\"", | ||
242 | dbus_message_iter_get_signature(&iter)); | ||
243 | goto bail; | 237 | goto bail; |
244 | } | 238 | } |
245 | dbus_message_iter_recurse(&iter, &variant); | 239 | dbus_message_iter_recurse(&iter, &variant); |
246 | 240 | ||
247 | 241 | ||
248 | if (dbus_message_iter_get_arg_type(&variant) != DBUS_TYPE_STRING) { | 242 | if (dbus_message_iter_get_arg_type(&variant) != DBUS_TYPE_STRING) { |
249 | sway_log(L_ERROR, "Relpy type incorrect"); | 243 | sway_log(L_ERROR, "Icon name relpy type incorrect"); |
250 | sway_log(L_ERROR, "Should be \"s\", is \"%s\"", | ||
251 | dbus_message_iter_get_signature(&iter)); | ||
252 | goto bail; | 244 | goto bail; |
253 | } | 245 | } |
254 | 246 | ||