X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/109b4b67cb54eadad6974f06cc68567c55d6acd4..6772d015e7e45a82ed1b0de3a930ad40a11d8079:/ugw/ugw.c diff --git a/ugw/ugw.c b/ugw/ugw.c index e2c04ef..243fc5a 100644 --- a/ugw/ugw.c +++ b/ugw/ugw.c @@ -93,7 +93,7 @@ enum in2out in_read(struct in_ctx *ctx, struct can_frame *cf) perror("read"); exit(1); } - return SEND; + return STORE_ONLY; } void init_read(struct in_ctx *ctx) @@ -234,8 +234,10 @@ int out_packet_tx(struct out_ctx *ctx, struct can_frame *cf) { volatile struct tpacket2_hdr *hdr = ctx->ptr + ctx->current*FRAME_SIZE; - if (ctx->from_in == NOP) + if (ctx->from_in == NOP) { + CHECK(send(ctx->s, NULL, 0, 0)); return 0; + } while (hdr->tp_status != TP_STATUS_AVAILABLE) { CHECK(send(ctx->s, NULL, 0, 0));