smb.diff

slynko, 01/18/2006 04:11 PM

Download (2.43 KB)

View differences:

smb_conn.c 17 Jan 2006 12:51:29 -0000
116 116
	struct smb_cred *scred,	struct smb_vc **vcpp)
117 117
{
118 118
	struct thread *td = scred->scr_td;
119
	struct smb_connobj *scp;
119 120
	struct smb_vc *vcp;
120 121
	int exact = 1;
121 122
	int error;
122 123

  
123 124
	vcspec->shspec = shspec;
124 125
	error = ENOENT;
125
	SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
126
	vcp = NULL;
127
	SMBCO_FOREACH(scp, &smb_vclist) {
128
		vcp = (struct smb_vc *)scp;
126 129
		error = smb_vc_lock(vcp, LK_EXCLUSIVE, td);
127 130
		if (error)
128 131
			continue;
......
573 576
	struct smb_cred *scred,	struct smb_share **sspp)
574 577
{
575 578
	struct thread *td = scred->scr_td;
579
	struct smb_connobj *scp;
576 580
	struct smb_share *ssp = NULL;
577 581
	int error;
578 582

  
579 583
	*sspp = NULL;
580 584
	dp->scred = scred;
581
	SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
585
	SMBCO_FOREACH(scp, VCTOCP(vcp)) {
586
		ssp = (struct smb_share *)scp;
582 587
		error = smb_share_lock(ssp, LK_EXCLUSIVE, td);
583 588
		if (error)
584 589
			continue;
......
832 837
	struct smb_share *ssp;
833 838
	struct smb_vc_info vci;
834 839
	struct smb_share_info ssi;
840
	struct smb_connobj *scp1, *scp2;
835 841
	int error, itype;
836 842

  
837 843
	KKASSERT(td->td_proc);
......
841 847
	error = smb_sm_lockvclist(LK_SHARED, td);
842 848
	if (error)
843 849
		return error;
844
	SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
850
	SMBCO_FOREACH(scp1, &smb_vclist) {
851
		vcp = (struct smb_vc *)scp1;
845 852
		error = smb_vc_lock(vcp, LK_SHARED, td);
846 853
		if (error)
847 854
			continue;
......
851 858
			smb_vc_unlock(vcp, 0, td);
852 859
			break;
853 860
		}
854
		SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
861
		SMBCO_FOREACH(scp2, VCTOCP(vcp)) {
862
			ssp = (struct smb_share *)scp2;
855 863
			error = smb_share_lock(ssp, LK_SHARED, td);
856 864
			if (error) {
857 865
				error = 0;
smb_usr.c 17 Jan 2006 13:03:35 -0000
296 296
	struct mdchain *mdp;
297 297
	int error, len;
298 298

  
299
	if (dp->ioc_tparamcnt > 0xffff || dp->ioc_tdatacnt > 0xffff ||
300
	    dp->ioc_setupcnt > 3)
299
	if (dp->ioc_setupcnt > 3)
301 300
		return EINVAL;
302 301
	error = smb_t2_init(t2p, SSTOCP(ssp), dp->ioc_setup[0], scred);
303 302
	if (error)