Commit 0166b0fa authored by Adam Wujek's avatar Adam Wujek 💬

arch-wrs: alloc portDS and ext_dsport in shmem

This is needed to be able to dump these structures in the wrs_dump_shmem
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent b95f0df8
......@@ -227,10 +227,11 @@ int main(int argc, char **argv)
ppi->iface_name = ppi->cfg.iface_name;
ppi->port_name = ppi->cfg.port_name;
ppi->mech = ppi->cfg.mech;
ppi->portDS = calloc(1, sizeof(*ppi->portDS));
if (ppi->portDS)
ppi->portDS = alloc_fn(ppsi_head, sizeof(*ppi->portDS));
if (ppi->portDS) {
ppi->portDS->ext_dsport =
calloc(1, sizeof(struct wr_dsport));
alloc_fn(ppsi_head, sizeof(struct wr_dsport));
}
if (!ppi->portDS || !ppi->portDS->ext_dsport) {
fprintf(stderr, "ppsi: out of memory\n");
exit(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment