Commit db6998f0 authored by Misbah Mubarak's avatar Misbah Mubarak

Dynamically allocating memory for packet arrival records

parent 0240e969
...@@ -1421,11 +1421,11 @@ void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg, ...@@ -1421,11 +1421,11 @@ void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg,
if(!hash_link) if(!hash_link)
{ {
bf->c5 = 1; bf->c5 = 1;
struct dfly_qhash_entry d_entry; struct dfly_qhash_entry * d_entry = malloc(sizeof (struct dfly_qhash_entry));
d_entry.num_chunks = 0; d_entry->num_chunks = 0;
d_entry.key = key; d_entry->key = key;
d_entry.remote_event_data = NULL; d_entry->remote_event_data = NULL;
qhash_add(s->rank_tbl, &key, &(d_entry.hash_link)); qhash_add(s->rank_tbl, &key, &(d_entry->hash_link));
s->rank_tbl_pop++; s->rank_tbl_pop++;
} }
......
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