-/* $OpenBSD: exf.c,v 1.34 2015/03/27 04:11:25 brynet Exp $ */
+/* $OpenBSD: exf.c,v 1.35 2015/04/19 01:10:59 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
* when locking is a little more reliable, this should change to be
* an error.
*/
- if (rcv_name == NULL)
+ if (rcv_name == NULL && !O_ISSET(sp, O_READONLY))
switch (file_lock(sp, oname,
&ep->fcntl_fd, ep->db->fd(ep->db), 0)) {
case LOCK_FAILED:
break;
case LOCK_UNAVAIL:
readonly = 1;
- if (!O_ISSET(sp, O_READONLY)) {
- msgq_str(sp, M_INFO, oname,
- "239|%s already locked, session is read-only");
- }
+ msgq_str(sp, M_INFO, oname,
+ "239|%s already locked, session is read-only");
break;
case LOCK_SUCCESS:
break;