summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
AgeCommit message (Collapse)AuthorFilesLines
2002-10-16Never do a ZERO_STRUCT on a structure in a linked list, it's dumb :-).Jeremy Allison1-1/+3
Jeremy. (This used to be commit 20986489f4736820a4981c6aa0eecccf169f0170)
2002-10-16SMB_ASSERT to check list terminates.Jeremy Allison1-0/+3
Jeremy. (This used to be commit bf3b0ef56168aff9b1bd5760b595f8951d434861)
2002-10-04Add a timeout to tdb_lock_bystring(). Ensure we never have more thanJeremy Allison1-7/+7
MAX_PRINT_JOBS in a queue. Jeremy. (This used to be commit 9fe3c0b90d4bff2217e3cb5a34b4683ca314c06e)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-110/+317
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-08-17sync 3.0 branch with headJelmer Vernooij1-221/+178
(This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-329/+708
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-04-22printing merge from HEADGerald Carter1-3/+6
(This used to be commit d3aed37dd87d425f51bcdc4e5151f0b0fe8f9c6b)
2002-03-20Ensure we don't do lp_servicename()'s in tdb traverse as thisJeremy Allison1-5/+7
allocates lots of memory. Jeremy. (This used to be commit fbc8c6a1096ec829f48b403239f105065bf155b1)
2002-03-20Print queue entries *must* have queue names, not numbers - numbers areJeremy Allison1-7/+30
not identical between different smbds (mr potter, come here and take your medicine.... :-). Jeremy. (This used to be commit 230941d2fbb746d39c00e482e7f600c68aa45efa)
2002-03-19Merge in JohnR's page count fixes.Jeremy Allison1-4/+31
Jeremy. (This used to be commit 2e3133fbe5531b9bbc9bf46a04b27fa58e555f5a)
2002-03-15syncing up printing code with SAMBA_2_2 (already done some mergesGerald Carter1-6/+6
in the reverse). * add in new printer change notify code from SAMBA_2_2 * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex() * sync up the _print_queue_struct in smb.h (why did someone change the user/file names in fs_user/fs_file (or vice-versa) ? ) * sync up some cli_spoolss_XXX functions (This used to be commit 5760315c1de4033fdc22684c940f18010010924f)
2002-03-14getpid() -> sys_getpid()Tim Potter1-1/+1
(This used to be commit a3cea5e9ae3b53ecbc45e61a39cbce0ca1b916aa)
2002-03-07Fix for machines that have their time changed forward, then back. EnsureJeremy Allison1-6/+18
that any cached lpq information gathered during that time doesn't stay around for longer than 1 hour. Jeremy. (This used to be commit 39fca711a5cf15a03d6c79639b202712d1749a64)
2002-02-26Fixup the sending of printer change messages from job changes.Jeremy Allison1-17/+21
Jeremy. (This used to be commit 28d4e7a3e2bd8f15ef807b821e4300a72bbc6904)
2002-02-25Merge of printing performance fixes from appliance.Tim Potter1-6/+6
(This used to be commit c8dc59dfe877f63bea6976b7d7fd448e0c8722ba)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-14Removed MAXSTATUS which was set incorrectly - thus causing tdb traversalJeremy Allison1-5/+3
of the connections db on smbd startup. This should fix the Solaris large load bug.... (fingers crossed). Jeremy. (This used to be commit 5b2b9c25af28543e67762805d1387524cbb6c39d)
2002-01-09Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endianJeremy Allison1-12/+13
in tdb's. All except winbindd_idmap.... Hmmmmmm. Jeremy. (This used to be commit ec71f1732b6b27bd2d65b250a6f3720a235dc38d)
2002-01-03Fixed nasty cast of tdb_delete in traversals.Jeremy Allison1-1/+1
Jeremy. (This used to be commit a0cdec3acc82d1ce0292fadd4b8dac23638450f3)
2001-12-21Factor out a broadcast_printer_notify() routine.Martin Pool1-7/+17
(This used to be commit d32598c953e7a500f707a02608c44203bc5941ec)
2001-12-18Fixed uninitialised variable warning.Tim Potter1-1/+1
(This used to be commit 5095941dcb312d75c232d15232d5998ca05b632f)
2001-12-05Use print_queue_length() by preference if we don't need a queueJeremy Allison1-0/+1
as it doesn't do a traversal. Jeremy. (This used to be commit 4bf4ee3f14a690592fa2e1b800fc0344522e6b30)
2001-12-05Improved efficiency of enumerating print queue's under a particularJeremy Allison1-9/+18
extreme condition... Jeremy. (This used to be commit 425bb0f40526b4eb17a3033892ca907b1d5293a4)
2001-10-16Optimisation to send only to correct processid.Jeremy Allison1-6/+16
Jeremy (This used to be commit 3807c747a4522c719fe67b876e4a3bd92bffcf7f)
2001-10-16very simple asynchronous "lpq" thread patchJean-François Micouleau1-2/+50
To speed up operations with the lpq command, it's now run in a separate asynchronous process. Opening the Printers folder on NT is now fast ;-) I think even faster than with a ** server Jeremy, you should look at that patch to include it in 2.2.3 J.F. (This used to be commit 8ef9dff3074e7979579ce66a204e8ec7bf62a587)
2001-10-02Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter1-2/+0
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-09-06got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell1-1/+1
(This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)
2001-09-04the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell1-4/+4
the client code still needs some work (This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
2001-09-03more NTSTATUS/WERROR conversionAndrew Tridgell1-11/+11
(This used to be commit ad648c5cd8ebe4be8304379117f403d7673dcbc8)
2001-08-23Fixed detection of CUPS. We need to check for the presence of the cupsTim Potter1-2/+2
header files as well as libcups. (This used to be commit 2dbb41a7b88e7fad63579111aaab4a1cd28c54d5)
2001-08-10Merge in the NT drivers changes from 2.2.Jeremy Allison1-1/+1
Jeremy. (This used to be commit a3781ad38ff6c70238e7e9b83324477e5c9780d5)
2001-08-10Replaced the duplicate DOS constants with appropriate ones from doserr.h toTim Potter1-9/+9
emphasise the fact that the spoolss pipe returns DOS error codes instead of 32-bit nt status codes. (This used to be commit 5f5ed41ee872d842e944cd2e84a80de714ad4385)
2001-07-16Fix for incorrect creation of print job names, based on a patch byJeremy Allison1-2/+2
José M.Rodríguez <josemi@iies.es> Jeremy. (This used to be commit 7ebf284ef7597ee347deb5245d6ba222a102f55d)
2001-07-04The big character set handling changeover!Andrew Tridgell1-13/+4
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-28Properly instrument print_job_start()/print_job_end() so every fail caseJeremy Allison1-4/+20
logs a debug. We need this to track fail cases. Jeremy (This used to be commit fe5cac150d7491a7dfdaf2a54998178bbfe5a303)
2001-06-04use LDSHFLAGS not -shared in several placesAndrew Tridgell1-1/+1
(This used to be commit 8ec9c87b5d1a7dae17d5b1a30f58effaf5e69e4b)
2001-04-18Removed mktemp from HEAD - same as done in 2.2.Jeremy Allison1-16/+7
Jeremy. (This used to be commit 121b59669fbcd1aaedb08011ff36169fc6561c55)
2001-04-08Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison1-10/+10
Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-03-26Fix from Dave Collier Brown to log a debug at level zero on common misconfigure.Jeremy Allison1-1/+13
Jeremy. (This used to be commit 4a3d2a13d3b0acab69c27b5b6522575b949eb5e6)
2001-03-16Added Michael Sweet's CUPS patch to call directly into the CUPS backend.Jeremy Allison1-157/+29
Parameterises the printing functions so other backends can be plugged directly in (this is a good thing :-). Jeremy. (This used to be commit c0345bbaed5d1aac777f1a33ff84ad1899f2ed6d)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-4/+0
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-02-23include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.Jeremy Allison1-50/+50
include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We need these to be different as we're storing LPQ_xx enums in the tdb already. rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now returning status codes. smbd/lanman.c: Change the RAP status codes to have "RAP" in the name. printing/printing.c: Keep track of the status of a job. Allow a job to be deleted from one smbd when being submitted by another. Made logic in mutex clearer. Jeremy. (This used to be commit 71029da7dd74eb91dd6953752bdf238f319d985d)
2001-02-22lib/select.c: Fix for Linux 2.0.x kernel that causes select to return true ↵Jeremy Allison1-17/+115
on a pipe and then a blocking read to fail. Make the pipe read/write non blocking. printing/printing.c: Added a mutex around the code that enumerates all the jobs in a print queue. Allows only one smbd to be doing this at any one time. This fixes a capacity problem discovered at HP with <10,000 jobs in a print queue. Jeremy. (This used to be commit 0d3ae603a2b86d476458ee2a7d4f7d22636c3f66)
2001-02-22Fixed file descriptor leak in error processing of print jobs.Jeremy Allison1-52/+39
NT sends "delete on close" to cancel a print job copied from the command line. Deal with this. Merged JohnR's fixes for print job errors. Jeremy. (This used to be commit 2060d74e48d62c99a1689ee02ac435b71918ddf0)
2001-02-15DEBUG merge from 2.2 about tdb init failure.Herb Lewis1-2/+20
Patch from David Collier-Brown to print permission error on spool file creation. (This used to be commit 8907a51743b7b9b9ad4168033fae4d44012cca37)
2001-01-29Changes from APPLIANCE_HEAD:David O'Neill1-3/+10
source/include/proto.h - make proto source/printing/nt_printing.c source/rpc_server/srv_spoolss_nt.c - Fix for the overwriting of printerdata entries when WinNT and Win2k are modifying printer parameters on PCL printers. Turns out that Win2k creates a printer with a NULL devmode entry and then expects to set it on *OPEN* (yes this is insane). So we cannot return a "default" devmode for a printer - and we must allow an open to set it. source/tdb/tdb.c - Show freelist in an easier format. Show total free. - When storing a new record, allocate memory for the key + data before the tdb_allocate() as if the malloc fails a (sparse) hole is left in the tdb. source/tdb/tdbtool.c - Show freelist in an easier format. Show total free. source/tdb/Makefile - cleaned up Makefile dependancies source/smbd/lanman.c - Fix for Win9x corrupting it's own parameter string. source/printing/printfsp.c source/printing/printing.c source/rpc_server/srv_spoolss_nt.c source/smbd/close.c - Added normal close parameter into print_fsp_end() which treats an abnormal close as error condition and deletes the spool file. (This used to be commit 025f7a092ad258ff774e3f5e53737f8210cc8af6)
2001-01-24Changes from APPLIANCE_HEAD:David O'Neill1-8/+17
source/printing/printing.c - When deleting a job, remove the entry from the back-end database if the delete succeeded. This stops a spurious permission denied message appearing if the forced database update is within the lpq cache timeout and doesn't actually delete the job from the database. (This used to be commit be61c98832d0a8969e608fd22da2035e454ec788)
2001-01-23Changes from APPLIANCE_HEAD:David O'Neill1-10/+42
source/rpc_server/srv_spoolss_nt.c - add an access check to _spoolss_deleteprinter() to stop random users and passers by from deleting printers. source/lib/messages.c - converted global msg_all struct to a local in message_send_all() function. source/include/smb.h - added a success error code to the spoolss return codes. source/include/proto.h source/param/loadparm.c source/printing/printing.c - Added new parameter "total print jobs" to limit the total number of print jobs across all queues. Currently individual queues are limited by "max print jobs". (This used to be commit 02f154e729b0e8465d3e1e2ac794e6ab3844ce57)
2001-01-23Changes from APPLIANCE_HEAD:David O'Neill1-1/+3
source/rpc_server/srv_spoolss_nt.c - remove redundant srv_spoolss_sendnotify() calls from _spoolss_startdocprinter() and _spoolss_enddocprinter(), as its functionality is already covered in print_job_start() and print_job_end() source/printing/printing.c - force a print_queue_update() prior to print queue purge so that all jobs are purged. (This used to be commit 0ccc552203d6432cde844c5946b203b27f257b1a)
2001-01-22Changes from APPLIANCE_HEAD:David O'Neill1-1/+1
source/printing/printing.c - remove unused variable (This used to be commit 2d09b53b3a9201c2f52306fc12ab01a92e712db2)