Skip to content
Snippets Groups Projects
Commit 4604cb16 authored by Filip Matusiak's avatar Filip Matusiak
Browse files

Set mid if needed in cmdu_alloc_custom

parent 9a08db99
No related branches found
No related tags found
1 merge request!30Set mid if needed in cmdu_alloc_custom
...@@ -335,6 +335,10 @@ struct cmdu_buff *cmdu_alloc_custom(uint16_t type, uint16_t *mid, char *ifname, ...@@ -335,6 +335,10 @@ struct cmdu_buff *cmdu_alloc_custom(uint16_t type, uint16_t *mid, char *ifname,
} }
cmdu_set_type(f, type); cmdu_set_type(f, type);
if (*mid == 0)
*mid = cmdu_get_next_mid();
cmdu_set_mid(f, *mid); cmdu_set_mid(f, *mid);
ret = cmdu_copy_tlvs_linear(f, tlvs, tlvslen); ret = cmdu_copy_tlvs_linear(f, tlvs, tlvslen);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment