remote: close file on usteer_init_local_id fread fail
[project/usteer.git] / parse.c
diff --git a/parse.c b/parse.c
index b0b7bc22a2e42b767e676272c5db038d7a1c22ee..2aa37169e8559750aa26425c351242ed805c9d9f 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -64,6 +64,8 @@ bool parse_apmsg_node(struct apmsg_node *msg, struct blob_attr *data)
                [APMSG_NODE_LOAD] = { .type = BLOB_ATTR_INT32 },
                [APMSG_NODE_RRM_NR] = { .type = BLOB_ATTR_NESTED },
                [APMSG_NODE_NODE_INFO] = { .type = BLOB_ATTR_NESTED },
+               [APMSG_NODE_CHANNEL] = { .type = BLOB_ATTR_INT32 },
+               [APMSG_NODE_OP_CLASS] = { .type = BLOB_ATTR_INT32 },
        };
        struct blob_attr *tb[__APMSG_NODE_MAX];
        struct blob_attr *cur;
@@ -90,6 +92,11 @@ bool parse_apmsg_node(struct apmsg_node *msg, struct blob_attr *data)
        msg->max_assoc = get_int32(tb[APMSG_NODE_MAX_ASSOC]);
        msg->rrm_nr = NULL;
 
+       if (tb[APMSG_NODE_CHANNEL] && tb[APMSG_NODE_OP_CLASS]) {
+               msg->channel = blob_get_int32(tb[APMSG_NODE_CHANNEL]);
+               msg->op_class = blob_get_int32(tb[APMSG_NODE_OP_CLASS]);
+       }
+
        cur = tb[APMSG_NODE_RRM_NR];
        if (cur && blob_len(cur) >= sizeof(struct blob_attr) &&
            blob_len(cur) >= blob_pad_len(blob_data(cur))) {