diff --git a/src/meas_lat.c b/src/meas_lat.c index 6d936e0..d860ac8 100644 --- a/src/meas_lat.c +++ b/src/meas_lat.c @@ -90,7 +90,7 @@ int on_receive_measure_packet_err(struct evt_core_ctx* ctx, struct evt_core_fdin sprintf(url, "timer:%d", fdinfo->fd); struct evt_core_fdinfo* assoc_timer = evt_core_get_from_url (ctx, url); if (assoc_timer != NULL) { - measure_summary (&mctx->mp, assoc_timer->other); + if (mctx->role == MEASLAT_CLIENT) measure_summary (&mctx->mp, assoc_timer->other); evt_core_rm_fd (ctx, assoc_timer->fd); printf("Deleted associated timer %s\n", url); } else { @@ -111,7 +111,7 @@ void measlat_stop( if (ms->mp_in->counter < mctx->mp.max_measure) return; if (ms->mp_out->counter < mctx->mp.max_measure) return; printf("[states] measurement %d+%d terminated\n", net_fd, timer_fd); - measure_summary (&(mctx->mp), ms); + if (mctx->role == MEASLAT_CLIENT) measure_summary (&(mctx->mp), ms); evt_core_rm_fd(ctx, timer_fd); if (!(mctx->connectionless && mctx->role == MEASLAT_SERVER)) evt_core_rm_fd(ctx, net_fd);