client: user_shell.c: fflush() after writes to stdout
This is useful if we have external programs interfacing with
stdin/stdout of osmo-remsim-client-shell. We don't want that output
to hang in some buffer indefinitely, but rather have the lines flushed
immediately.
Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62
diff --git a/src/client/user_shell.c b/src/client/user_shell.c
index d5cad7b..11601d6 100644
--- a/src/client/user_shell.c
+++ b/src/client/user_shell.c
@@ -23,6 +23,7 @@
const struct TpduCardToModem *card2modem = &pdu->msg.choice.tpduCardToModem;
printf("R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size));
+ fflush(stdout);
return 0;
}
@@ -36,6 +37,7 @@
printf("SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf,
pdu->msg.choice.setAtrReq.atr.size));
+ fflush(stdout);
resp = rspro_gen_SetAtrRes(ResultCode_ok);
if (!resp)