hastd/primary.c micro fixes

Mikolaj Golub to.my.trociny at gmail.com
Sun Nov 14 09:16:25 UTC 2010


Hi,

noticed the following in hastd/primary.c:

1) in init_remote() when incoming connection is set up, if proto_client()
fails it only reports about the error and try proto_connect() anyway. This
will cause a crash as proto_conn structure is not valid. Primary should rather
exit (as it is when outgoing connection is set up, and as it is in the patch
below) or set proto_conn pointer to NULL and goto close.

2) in guard_thread() timeout.tv_sec is set in loop, while it looks like it may
be set only once before the loop.

-- 
Mikolaj Golub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: primary.c.patch
Type: text/x-patch
Size: 981 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20101114/3b5d8ecf/primary.c.bin


More information about the freebsd-fs mailing list