- //try to find comm on the list of finished flows
- uintptr_t key = 0;
- uintptr_t data = 0;
- xbt_dict_cursor_t cursor;
- xbt_dict_foreach(simix_global->latency_limited_dict, cursor, key, data) {
- DEBUG2("comparing key=%p with comm=%p", (void *) key, (void *) action);
- if ((void *) action == (void *) key) {
- DEBUG2("key %p found, return value latency limited value %d",
- (void *) key, (int) data);
- xbt_dict_cursor_free(&cursor);
- return (int) data;
- }
+ if (action->comm.surf_comm){
+ DEBUG1("Getting latency limited for surf_action (%p)", action->comm.surf_comm);
+ action->latency_limited = surf_workstation_model->get_latency_limited(action->comm.surf_comm);
+ DEBUG1("Action limited is %d", action->latency_limited);