TALLOC_FREE(fsp->fh);
}
- DLIST_ADD(Files, fsp);
+ DLIST_ADD(smbd_server_conn->files, fsp);
DEBUG(5,("allocated file structure %d, fnum = %d (%d used)\n",
i, fsp->fnum, files_used));
{
files_struct *fsp, *next;
- for (fsp=Files;fsp;fsp=next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=next) {
next = fsp->next;
if (fsp->conn == conn) {
close_file(NULL, fsp, SHUTDOWN_CLOSE);
{
files_struct *fsp, *next;
- for (fsp=Files;fsp;fsp=next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=next) {
next = fsp->next;
if ((fsp->file_pid == smbpid) && (fsp->vuid == vuid)) {
close_file(NULL, fsp, SHUTDOWN_CLOSE);
{
files_struct *fsp, *next;
- for (fsp=Files;fsp;fsp=next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=next) {
next=fsp->next;
if (fsp->vuid == vuid) {
close_file(NULL, fsp, SHUTDOWN_CLOSE);
{
struct files_struct *fsp, *next;
- for (fsp = Files; fsp; fsp = next) {
+ for (fsp = smbd_server_conn->files; fsp; fsp = next) {
struct files_struct *ret;
next = fsp->next;
ret = fn(fsp, private_data);
int count=0;
files_struct *fsp;
- for (fsp=Files;fsp;fsp=fsp->next,count++) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next,count++) {
if (fsp->fh->fd == fd) {
if (count > 10) {
- DLIST_PROMOTE(Files, fsp);
+ DLIST_PROMOTE(smbd_server_conn->files, fsp);
}
return fsp;
}
int count=0;
files_struct *fsp;
- for (fsp=Files;fsp;fsp=fsp->next,count++) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next,count++) {
/* We can have a fsp->fh->fd == -1 here as it could be a stat open. */
if (file_id_equal(&fsp->file_id, &id) &&
fsp->fh->gen_id == gen_id ) {
if (count > 10) {
- DLIST_PROMOTE(Files, fsp);
+ DLIST_PROMOTE(smbd_server_conn->files, fsp);
}
/* Paranoia check. */
if ((fsp->fh->fd == -1) &&
fsp_fi_cache.id = id;
- for (fsp=Files;fsp;fsp=fsp->next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next) {
if (file_id_equal(&fsp->file_id, &id)) {
/* Setup positive cache. */
fsp_fi_cache.fsp = fsp;
dlen = strlen(d_fullname);
- for (fsp=Files;fsp;fsp=fsp->next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next) {
char *d1_fullname;
if (fsp == dir_fsp) {
{
files_struct *fsp, *next;
- for (fsp=Files;fsp;fsp=next) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=next) {
next=fsp->next;
if ((conn == fsp->conn) && (fsp->fh->fd != -1)) {
sync_file(conn, fsp, True /* write through */);
void file_free(struct smb_request *req, files_struct *fsp)
{
- DLIST_REMOVE(Files, fsp);
+ DLIST_REMOVE(smbd_server_conn->files, fsp);
TALLOC_FREE(fsp->fake_file_handle);
files_struct *fsp;
int count=0;
- for (fsp=Files;fsp;fsp=fsp->next, count++) {
+ for (fsp=smbd_server_conn->files;fsp;fsp=fsp->next, count++) {
if (fsp->fnum == fnum) {
if (count > 10) {
- DLIST_PROMOTE(Files, fsp);
+ DLIST_PROMOTE(smbd_server_conn->files, fsp);
}
return fsp;
}