index ef66af56c408d8ae1ab300386875c7d57fe93189..fb45200a519801da29a823adba57a25ded5c263d 100644 (file)
--- a/src/utils_cmd_listval.c
+++ b/src/utils_cmd_listval.c
} while (0)
#define print_to_socket(fh, ...) \
- if (fprintf (fh, __VA_ARGS__) < 0) { \
- char errbuf[1024]; \
- WARNING ("handle_listval: failed to write to socket #%i: %s", \
- fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
- free_everything_and_return (-1); \
- }
+ do { \
+ if (fprintf (fh, __VA_ARGS__) < 0) { \
+ char errbuf[1024]; \
+ WARNING ("handle_listval: failed to write to socket #%i: %s", \
+ fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
+ free_everything_and_return (-1); \
+ } \
+ fflush(fh); \
+ } while (0)
int handle_listval (FILE *fh, char *buffer)
{