Skip to content

Commit

Permalink
[saisdkdump]: Fix dump generation crash (sonic-net#493)
Browse files Browse the repository at this point in the history
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
  • Loading branch information
Volodymyr Samotiy authored and lguohan committed Jul 31, 2019
1 parent 80c7e8b commit abfeef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion saisdkdump/saisdkdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ int main(int argc, char **argv)
}

sai_object_id_t switch_id;
const uint32_t AttributesCount = 1;
const uint32_t AttributesCount = 2;
sai_attribute_t attrs[AttributesCount];
attrs[0].id = SAI_SWITCH_ATTR_INIT_SWITCH;
attrs[0].value.booldata = false;
attrs[1].id = SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL;
attrs[1].value.booldata = false;

status = switch_api->create_switch(&switch_id, AttributesCount, attrs);
if (status != SAI_STATUS_SUCCESS)
Expand Down

0 comments on commit abfeef3

Please sign in to comment.