Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature-vt/sys/src/cmd/aquarela/smbcomflush.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "headers.h"
2
#include <String.h>
3
 
4
SmbProcessResult
5
smbcomflush(SmbSession *s, SmbHeader *h, uchar *pdata, SmbBuffer *)
6
{
7
	SmbTree *t;
8
	SmbFile *f;
9
	ushort fid;
10
	Dir nulldir;
11
	if (h->wordcount != 1)
12
		return SmbProcessResultFormat;
13
	fid = smbnhgets(pdata);
14
	t = smbidmapfind(s->tidmap, h->tid);
15
	if (t == nil) {
16
		smbseterror(s, ERRSRV, ERRinvtid);
17
		return SmbProcessResultError;
18
	}
19
	f = smbidmapfind(s->fidmap, fid);
20
	if (f == nil) {
21
		smbseterror(s, ERRDOS, ERRbadfid);
22
		return SmbProcessResultError;
23
	}
24
	memset(&nulldir, 0xff, sizeof(nulldir));
25
	nulldir.name = nulldir.uid = nulldir.gid = nulldir.muid = nil;
26
	dirfwstat(f->fd, &nulldir);
27
	return smbbufferputack(s->response, h, &s->peerinfo);
28
}