diff --git a/src/algo_rr.c b/src/algo_rr.c index df665c2..5eda380 100644 --- a/src/algo_rr.c +++ b/src/algo_rr.c @@ -257,7 +257,7 @@ co_error: int rr_on_udp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { struct buffer_packet* bp; - struct evt_core_fdinfo *to_fdinfo; + struct evt_core_fdinfo *to_fdinfo = NULL; struct algo_ctx* app_ctx = fdinfo->cat->app_ctx; struct rr_ctx* rr = app_ctx->misc; int read_res = FDS_READY; @@ -300,7 +300,10 @@ int rr_on_udp_read(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { if (!(rr->my_links & (1 << rr->current_link))) continue; sprintf(url, "tcp:write:127.0.0.1:%d", 7500 + rr->current_link); //@FIXME Hardcoded to_fdinfo = evt_core_get_from_url (ctx, url); - if (to_fdinfo != NULL) break; + if (to_fdinfo != NULL) { + printf("Selected url %s\n", url); + break; + } } rr->emit_time = curr; rr->sent_id++;