src.ctf.lttng-live: return unsigned integers in `sessions` query object
[babeltrace.git] / src / plugins / ctf / lttng-live / viewer-connection.c
index 6b206d3427077a976e5765985ed213d0c4383462..ddc250145068c69913d0fed9ad154ff5172539ad 100644 (file)
@@ -361,10 +361,10 @@ int list_update_session(bt_value *results,
                                ret = -1;
                                goto end;
                        }
-                       val = bt_value_integer_signed_get(btval);
+                       val = bt_value_integer_unsigned_get(btval);
                        /* sum */
                        val += streams;
-                       bt_value_integer_signed_set(btval, val);
+                       bt_value_integer_unsigned_set(btval, val);
 
                        btval = bt_value_map_borrow_entry_value(map, "client-count");
                        if (!btval) {
@@ -372,10 +372,10 @@ int list_update_session(bt_value *results,
                                ret = -1;
                                goto end;
                        }
-                       val = bt_value_integer_signed_get(btval);
+                       val = bt_value_integer_unsigned_get(btval);
                        /* max */
                        val = bt_max_t(int64_t, clients, val);
-                       bt_value_integer_signed_set(btval, val);
+                       bt_value_integer_unsigned_set(btval, val);
                }
 
                if (found) {
@@ -469,7 +469,7 @@ int list_append_session(bt_value *results,
        {
                uint32_t live_timer = be32toh(session->live_timer);
 
-               insert_status = bt_value_map_insert_signed_integer_entry(
+               insert_status = bt_value_map_insert_unsigned_integer_entry(
                        map, "timer-us", live_timer);
                if (insert_status != BT_VALUE_MAP_INSERT_ENTRY_STATUS_OK) {
                        BT_COMP_LOGE_STR("Error inserting \"timer-us\" entry.");
@@ -485,7 +485,7 @@ int list_append_session(bt_value *results,
        {
                uint32_t streams = be32toh(session->streams);
 
-               insert_status = bt_value_map_insert_signed_integer_entry(map,
+               insert_status = bt_value_map_insert_unsigned_integer_entry(map,
                        "stream-count", streams);
                if (insert_status != BT_VALUE_MAP_INSERT_ENTRY_STATUS_OK) {
                        BT_COMP_LOGE_STR("Error inserting \"stream-count\" entry.");
@@ -501,7 +501,7 @@ int list_append_session(bt_value *results,
        {
                uint32_t clients = be32toh(session->clients);
 
-               insert_status = bt_value_map_insert_signed_integer_entry(map,
+               insert_status = bt_value_map_insert_unsigned_integer_entry(map,
                        "client-count", clients);
                if (insert_status != BT_VALUE_MAP_INSERT_ENTRY_STATUS_OK) {
                        BT_COMP_LOGE_STR("Error inserting \"client-count\" entry.");
This page took 0.035077 seconds and 4 git commands to generate.