=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/tmux/client.c 2009/06/25 22:09:20 1.3 --- src/usr.bin/tmux/client.c 2009/07/22 21:58:56 1.4 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.3 2009/06/25 22:09:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.4 2009/07/22 21:58:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 36,42 **** void client_handle_winch(struct client_ctx *); int ! client_init(char *path, struct client_ctx *cctx, int start_server, int flags) { struct sockaddr_un sa; struct stat sb; --- 36,42 ---- void client_handle_winch(struct client_ctx *); int ! client_init(char *path, struct client_ctx *cctx, int cmdflags, int flags) { struct sockaddr_un sa; struct stat sb; *************** *** 53,59 **** setproctitle("client (%s)", rpathbuf); if (lstat(path, &sb) != 0) { ! if (start_server && errno == ENOENT) { if ((cctx->srv_fd = server_start(path)) == -1) goto start_failed; goto server_started; --- 53,59 ---- setproctitle("client (%s)", rpathbuf); if (lstat(path, &sb) != 0) { ! if (cmdflags & CMD_STARTSERVER && errno == ENOENT) { if ((cctx->srv_fd = server_start(path)) == -1) goto start_failed; goto server_started; *************** *** 79,85 **** if (connect( cctx->srv_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) { if (errno == ECONNREFUSED) { ! if (unlink(path) != 0 || !start_server) goto not_found; if ((cctx->srv_fd = server_start(path)) == -1) goto start_failed; --- 79,85 ---- if (connect( cctx->srv_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) { if (errno == ECONNREFUSED) { ! if (unlink(path) != 0 || !(cmdflags & CMD_STARTSERVER)) goto not_found; if ((cctx->srv_fd = server_start(path)) == -1) goto start_failed;