cluster/group/daemon main.c
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-12-01 15:25:30
Modified files:
group/daemon : main.c
Log message:
group_tool dump doesn't handle partial reads/writes, now we always dump entire fixed size debug buffer bz 214540
group/daemon/main.c +11 -12
@@ -551,25 +551,24 @@static int do_dump (int fd) { -int rv, len; +int rv, len =DUMP_SIZE ;if (dump_wrap) { len =DUMP_SIZE - dump_point; - rv =write (fd, dump_buf + dump_point, len); -if (rv != len) -log_print ("write error %d errno %d" , rv, errno); - } - len = dump_point; - - rv =write (fd, dump_buf, len); -if (rv != len) -log_print ("write error %d errno %d" , rv, errno); + rv =do_write (fd, dump_buf + dump_point, len); +if (rv <0 ) +log_print ("dump write error %d errno %d" , rv, errno); + len = dump_point; + } + + rv =do_write (fd, dump_buf, len); +if (rv <0 ) +log_print ("dump write error %d errno %d" , rv, errno);return 0 ; }static int do_log (int fd,const char *comment) { -log_print ("%s" , comment);return 0 ; }
@@ -673,7 +672,7 @@break ;default : -log_print ("unknown action %d client %d bytes %d" , act, ci, rv); +log_print ("unknown action %d client %d" , act, ci);log_print ("invalid message: \"%s\"" , buf); } }