secondary.c (204076) | secondary.c (207371) |
---|---|
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 204076 2010-02-18 23:16:19Z pjd $"); | 31__FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 207371 2010-04-29 15:36:32Z 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> --- 292 unchanged lines hidden (view full) --- 332 res->hr_remoteout = NULL; 333 res->hr_workerpid = pid; 334 return; 335 } 336 (void)pidfile_close(pfh); 337 338 setproctitle("%s (secondary)", res->hr_name); 339 | 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> --- 292 unchanged lines hidden (view full) --- 332 res->hr_remoteout = NULL; 333 res->hr_workerpid = pid; 334 return; 335 } 336 (void)pidfile_close(pfh); 337 338 setproctitle("%s (secondary)", res->hr_name); 339 |
340 /* Error in setting timeout is not critical, but why should it fail? */ 341 if (proto_timeout(res->hr_remotein, 0) < 0) 342 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); 343 if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0) 344 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); 345 |
|
340 init_local(res); 341 init_remote(res, nvin); 342 init_environment(); 343 344 error = pthread_create(&td, NULL, recv_thread, res); 345 assert(error == 0); 346 error = pthread_create(&td, NULL, disk_thread, res); 347 assert(error == 0); --- 350 unchanged lines hidden --- | 346 init_local(res); 347 init_remote(res, nvin); 348 init_environment(); 349 350 error = pthread_create(&td, NULL, recv_thread, res); 351 assert(error == 0); 352 error = pthread_create(&td, NULL, disk_thread, res); 353 assert(error == 0); --- 350 unchanged lines hidden --- |