From e0475afa8375eb27795aaecca16f8ae6f98666e7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 Aug 2004 17:49:00 +0000 Subject: r1665: Patch from James Peach @ SGI to stop using sendfile if it isn't supported by the underlying OS. Jeremy. (This used to be commit 1b0c70cf97aa45093fe5ef866a351b47ef1a5879) --- source3/param/loadparm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 549e232fe0..4150f57e55 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -4323,6 +4323,18 @@ BOOL lp_use_sendfile(int snum) return (_lp_use_sendfile(snum) && (get_remote_arch() != RA_WIN95) && !srv_is_signing_active()); } +/******************************************************************* + Turn off sendfile if we find the underlying OS doesn't support it. +********************************************************************/ + +void set_use_sendfile(int snum, BOOL val) +{ + if (LP_SNUM_OK(snum)) + ServicePtrs[snum]->bUseSendfile = val; + else + sDefault.bUseSendfile = val; +} + /******************************************************************* Turn off storing DOS attributes if this share doesn't support it. ********************************************************************/ -- cgit