Deleted Added
full compact
smb_rq.c (82037) smb_rq.c (87192)
1/*
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/netsmb/smb_rq.c 82037 2001-08-21 08:21:03Z bp $
32 * $FreeBSD: head/sys/netsmb/smb_rq.c 87192 2001-12-02 08:47:29Z bp $
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 134 unchanged lines hidden (view full) ---

175 if (ssp == NULL || rqp->sr_cred == &rqp->sr_vc->vc_iod->iod_scred) {
176 return smb_iod_addrq(rqp);
177 }
178 for (;;) {
179 SMBS_ST_LOCK(ssp);
180 if (ssp->ss_flags & SMBS_RECONNECTING) {
181 msleep(&ssp->ss_vcgenid, SMBS_ST_LOCKPTR(ssp),
182 PWAIT | PDROP, "90trcn", hz);
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 134 unchanged lines hidden (view full) ---

175 if (ssp == NULL || rqp->sr_cred == &rqp->sr_vc->vc_iod->iod_scred) {
176 return smb_iod_addrq(rqp);
177 }
178 for (;;) {
179 SMBS_ST_LOCK(ssp);
180 if (ssp->ss_flags & SMBS_RECONNECTING) {
181 msleep(&ssp->ss_vcgenid, SMBS_ST_LOCKPTR(ssp),
182 PWAIT | PDROP, "90trcn", hz);
183 if (smb_proc_intr(rqp->sr_cred->scr_p))
183 if (smb_proc_intr(rqp->sr_cred->scr_td->td_proc))
184 return EINTR;
185 continue;
186 }
187 if (smb_share_valid(ssp) || (ssp->ss_flags & SMBS_CONNECTED) == 0) {
188 SMBS_ST_UNLOCK(ssp);
189 } else {
190 SMBS_ST_UNLOCK(ssp);
191 error = smb_iod_request(rqp->sr_vc->vc_iod,

--- 47 unchanged lines hidden (view full) ---

239 if (bcnt > 0xffff)
240 SMBERROR("byte count too large (%d)\n", bcnt);
241 *rqp->sr_bcount = htoles(bcnt);
242}
243
244int
245smb_rq_intr(struct smb_rq *rqp)
246{
184 return EINTR;
185 continue;
186 }
187 if (smb_share_valid(ssp) || (ssp->ss_flags & SMBS_CONNECTED) == 0) {
188 SMBS_ST_UNLOCK(ssp);
189 } else {
190 SMBS_ST_UNLOCK(ssp);
191 error = smb_iod_request(rqp->sr_vc->vc_iod,

--- 47 unchanged lines hidden (view full) ---

239 if (bcnt > 0xffff)
240 SMBERROR("byte count too large (%d)\n", bcnt);
241 *rqp->sr_bcount = htoles(bcnt);
242}
243
244int
245smb_rq_intr(struct smb_rq *rqp)
246{
247 struct proc *p = rqp->sr_cred->scr_p;
247 struct proc *p = rqp->sr_cred->scr_td->td_proc;
248
249 if (rqp->sr_flags & SMBR_INTR)
250 return EINTR;
251 return smb_proc_intr(p);
252}
253
254int
255smb_rq_getrequest(struct smb_rq *rqp, struct mbchain **mbpp)

--- 497 unchanged lines hidden ---
248
249 if (rqp->sr_flags & SMBR_INTR)
250 return EINTR;
251 return smb_proc_intr(p);
252}
253
254int
255smb_rq_getrequest(struct smb_rq *rqp, struct mbchain **mbpp)

--- 497 unchanged lines hidden ---