WIP debug measlat

This commit is contained in:
Quentin 2019-10-16 18:15:09 +02:00
parent a90018c871
commit 32fc6a9fc5
2 changed files with 5 additions and 2 deletions

View file

@ -11,5 +11,5 @@ donar \
> $6/log/client-donar-stdout.log 2> $6/log/client-donar-stderr.log &
sleep 2
measlat -h 127.13.3.7 -p 9000 -r > /dev/null 2>&1 # Used to wait for connections
measlat -h 127.13.3.7 -p 9000 -r > $6/log/client-measboot-stdout.log 2> $6/log/client-measboot-stderr.log
measlat -h 127.13.3.7 -p 9000 -c $1 -i $2 -s $3 > $6/log/client-measlat-stdout.log 2> $6/log/client-measlat-stderr.log

View file

@ -160,7 +160,10 @@ int on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
struct evt_core_fdinfo* tgtinfo = evt_core_get_first_from_cat (ctx, "udp-read");
if (tgtinfo == NULL) tgtinfo = evt_core_get_first_from_cat (ctx, "tcp-read");
if (tgtinfo == NULL || mctx->mc.counter > mctx->mc.max_measure) {
if (!mctx->mc.is_server && tgtinfo == NULL) {
fprintf(stderr, "Unable to find a fdinfo in udp-read nor in tcp-read. Quitting...\n");
exit(EXIT_FAILURE);
} else if (mctx->mc.is_server && (tgtinfo == NULL || mctx->mc.counter > mctx->mc.max_measure)) {
printf("No connection yet\n");
struct evt_core_fdinfo* timer_fd = evt_core_get_first_from_cat (ctx, "timer");
evt_core_rm_fd(ctx, timer_fd->fd);