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
changes/16/17216/1
Harald Welte 3 years ago
parent 1b6696f144
commit 82368402af
  1. 2
      src/client/user_shell.c

@ -23,6 +23,7 @@ static int bankd_handle_tpduCardToModem(struct bankd_client *bc, const RsproPDU_
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 @@ static int bankd_handle_setAtrReq(struct bankd_client *bc, const RsproPDU_t *pdu
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)

Loading…
Cancel
Save