spr_get_error_message.c 294 B

1234567891011121314
  1. /*
  2. * Construct the error message from a SeatPromptResult, and return it
  3. * in a dynamically allocated string.
  4. */
  5. #include "putty.h"
  6. char *spr_get_error_message(SeatPromptResult spr)
  7. {
  8. strbuf *sb = strbuf_new();
  9. spr.errfn(spr, BinarySink_UPCAST(sb));
  10. return strbuf_to_str(sb);
  11. }