switch (dom) {
/*
- * Don't mark Unix domain, system or multipath sockets as
+ * Don't mark Unix domain or system
* eligible for defunct by default.
*/
case PF_LOCAL:
case PF_SYSTEM:
- case PF_MULTIPATH:
so->so_flags |= SOF_NODEFUNCT;
break;
default:
} else {
error = (*so->so_proto->pr_usrreqs->pru_connect)
(so, nam, p);
+ if (error != 0) {
+ so->so_state &= ~SS_ISCONNECTING;
+ }
}
}
if (dolock) {
error = (*so->so_proto->pr_usrreqs->pru_connectx)
(so, src, dst, p, ifscope, aid, pcid,
flags, arg, arglen, auio, bytes_written);
+ if (error != 0) {
+ so->so_state &= ~SS_ISCONNECTING;
+ }
}
}
bzero(lock_history_str, sizeof(lock_history_str));
for (i = SO_LCKDBG_MAX - 1; i >= 0; i--) {
- n += snprintf(lock_history_str + n,
+ n += scnprintf(lock_history_str + n,
SO_LOCK_HISTORY_STR_LEN - n, "%p:%p ",
so->lock_lr[(so->next_lock_lr + i) % SO_LCKDBG_MAX],
so->unlock_lr[(so->next_unlock_lr + i) % SO_LCKDBG_MAX]);