summaryrefslogtreecommitdiffstats
path: root/sys/netsmb
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-03-01 03:14:23 +0000
committerrwatson <rwatson@FreeBSD.org>2004-03-01 03:14:23 +0000
commitb0b5f961bd295aee20ca2584b96ebf00e9cb92f3 (patch)
tree6b16845a701c80c2675bb9aed085227f806e915d /sys/netsmb
parent9fe9a307306d35d1219be5eb3a88475032b080d0 (diff)
downloadFreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.zip
FreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.tar.gz
Rename dup_sockaddr() to sodupsockaddr() for consistency with other
functions in kern_socket.c. Rename the "canwait" field to "mflags" and pass M_WAITOK and M_NOWAIT in from the caller context rather than "1" or "0". Correct mflags pass into mac_init_socket() from previous commit to not include M_ZERO. Submitted by: sam
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_conn.c4
-rw-r--r--sys/netsmb/smb_trantcp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c
index 11d8a65..84d7087 100644
--- a/sys/netsmb/smb_conn.c
+++ b/sys/netsmb/smb_conn.c
@@ -419,10 +419,10 @@ smb_vc_create(struct smb_vcspec *vcspec,
smb_sl_init(&vcp->vc_stlock, "vcstlock");
error = ENOMEM;
- vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1);
+ vcp->vc_paddr = sodupsockaddr(vcspec->sap, M_WAITOK);
if (vcp->vc_paddr == NULL)
goto fail;
- vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1);
+ vcp->vc_laddr = sodupsockaddr(vcspec->lap, M_WAITOK);
if (vcp->vc_laddr == NULL)
goto fail;
vcp->vc_pass = smb_strdup(vcspec->pass);
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index a8050cd..1832388 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -564,7 +564,7 @@ smb_nbst_bind(struct smb_vc *vcp, struct sockaddr *sap, struct thread *td)
slen = sap->sa_len;
if (slen < NB_MINSALEN)
break;
- snb = (struct sockaddr_nb*)dup_sockaddr(sap, 1);
+ snb = (struct sockaddr_nb*)sodupsockaddr(sap, M_WAITOK);
if (snb == NULL) {
error = ENOMEM;
break;
@@ -597,7 +597,7 @@ smb_nbst_connect(struct smb_vc *vcp, struct sockaddr *sap, struct thread *td)
free(nbp->nbp_paddr, M_SONAME);
nbp->nbp_paddr = NULL;
}
- snb = (struct sockaddr_nb*)dup_sockaddr(sap, 1);
+ snb = (struct sockaddr_nb*)sodupsockaddr(sap, M_WAITOK);
if (snb == NULL)
return ENOMEM;
nbp->nbp_paddr = snb;
OpenPOWER on IntegriCloud