- xbt_dynar_t d = static_cast<xbt_dynar_t>(xbt_dict_get_or_null(keys, aux));
-
- // first posted
- if(xbt_dynar_is_empty(d)){
- TRACE_smpi_put_key(src, dst, tag, key, n, send);
- return key;
+ auto it = keys.find(aux);
+ if (it == keys.end()) {
+ // first posted
+ TRACE_smpi_put_key(src, dst, tag, key, n, send);
+ } else {
+ snprintf(key, n, "%s", it->second->front().c_str());
+ it->second->pop_front();