Deleted Added
full compact
secondary.c (210879) secondary.c (210880)
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 210879 2010-08-05 18:56:24Z pjd $");
31__FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 210880 2010-08-05 18:58:00Z pjd $");
32
33#include <sys/param.h>
34#include <sys/time.h>
35#include <sys/bio.h>
36#include <sys/disk.h>
37#include <sys/stat.h>
38
39#include <assert.h>

--- 295 unchanged lines hidden (view full) ---

335 res->hr_remoteout = NULL;
336 res->hr_workerpid = pid;
337 return;
338 }
339 (void)pidfile_close(pfh);
340
341 setproctitle("%s (secondary)", res->hr_name);
342
32
33#include <sys/param.h>
34#include <sys/time.h>
35#include <sys/bio.h>
36#include <sys/disk.h>
37#include <sys/stat.h>
38
39#include <assert.h>

--- 295 unchanged lines hidden (view full) ---

335 res->hr_remoteout = NULL;
336 res->hr_workerpid = pid;
337 return;
338 }
339 (void)pidfile_close(pfh);
340
341 setproctitle("%s (secondary)", res->hr_name);
342
343 signal(SIGHUP, SIG_DFL);
344 signal(SIGCHLD, SIG_DFL);
345
343 /* Error in setting timeout is not critical, but why should it fail? */
344 if (proto_timeout(res->hr_remotein, 0) < 0)
345 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
346 if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0)
347 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
348
349 init_local(res);
350 init_remote(res, nvin);

--- 356 unchanged lines hidden ---
346 /* Error in setting timeout is not critical, but why should it fail? */
347 if (proto_timeout(res->hr_remotein, 0) < 0)
348 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
349 if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0)
350 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout");
351
352 init_local(res);
353 init_remote(res, nvin);

--- 356 unchanged lines hidden ---