]> err.no Git - systemd/commitdiff
bus_property_append_long: use signed long and 'x' in the signature for DBUS_TYPE_INT64
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 21 May 2011 21:18:38 +0000 (23:18 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 21 May 2011 21:18:38 +0000 (23:18 +0200)
src/dbus-common.c
src/dbus-socket.c

index fe7f84b119352772173f44d10586c5a2ff891e47..9bf0dabe4cf1da450dc84d3a58f63330059064ef 100644 (file)
@@ -569,15 +569,15 @@ int bus_property_append_ul(DBusMessageIter *i, const char *property, void *data)
 }
 
 int bus_property_append_long(DBusMessageIter *i, const char *property, void *data) {
-        uint64_t u;
+        int64_t l;
 
         assert(i);
         assert(property);
         assert(data);
 
-        u = (int64_t) *(long*) data;
+        l = (int64_t) *(long*) data;
 
-        if (!dbus_message_iter_append_basic(i, DBUS_TYPE_INT64, &u))
+        if (!dbus_message_iter_append_basic(i, DBUS_TYPE_INT64, &l))
                 return -ENOMEM;
 
         return 0;
index b81569d504851fb3eed29b2ca7465d11c056ca24..7194611d650a12e5a6d0993185ba6e2086e6d15d 100644 (file)
@@ -115,8 +115,8 @@ DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMes
                 { "org.freedesktop.systemd1.Socket", "MaxConnections", bus_property_append_unsigned,     "u", &u->socket.max_connections },
                 { "org.freedesktop.systemd1.Socket", "NConnections",   bus_property_append_unsigned,     "u", &u->socket.n_connections   },
                 { "org.freedesktop.systemd1.Socket", "NAccepted",      bus_property_append_unsigned,     "u", &u->socket.n_accepted      },
-                { "org.freedesktop.systemd1.Socket", "MessageQueueMaxMessages", bus_property_append_long,"t", &u->socket.mq_maxmsg       },
-                { "org.freedesktop.systemd1.Socket", "MessageQueueMessageSize", bus_property_append_long,"t", &u->socket.mq_msgsize      },
+                { "org.freedesktop.systemd1.Socket", "MessageQueueMaxMessages", bus_property_append_long,"x", &u->socket.mq_maxmsg       },
+                { "org.freedesktop.systemd1.Socket", "MessageQueueMessageSize", bus_property_append_long,"x", &u->socket.mq_msgsize      },
                 { NULL, NULL, NULL, NULL, NULL }
         };