summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Adapt fls64 to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt tally_num to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt tally_add to Samba coding conventionsVolker Lendecke2011-08-101-3/+5
|
* Adapt renormalize to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt shift_overflows to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt bucket_min to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt bucket_of to Samba coding conventionsVolker Lendecke2011-08-101-1/+2
|
* Adapt tally_new to Samba coding conventionsVolker Lendecke2011-08-101-2/+5
|
* Slightly simplify tally_newVolker Lendecke2011-08-101-7/+9
|
* Fix a c++ warningVolker Lendecke2011-08-101-1/+1
|
* Fix a c++ warningVolker Lendecke2011-08-101-1/+2
|
* s3: Adapt msg_idmap.c to Samba coding conventionsVolker Lendecke2011-08-101-5/+5
|
* s3: Fix some nonempty blank linesVolker Lendecke2011-08-101-1/+1
|
* s3: Fix some typos -- Simo, please checkVolker Lendecke2011-08-101-7/+7
|
* selftest: Always test the spoolss deamon.Andreas Schneider2011-08-101-0/+1
| | | | | Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Wed Aug 10 19:29:14 CEST 2011 on sn-devel-104
* s3-spoolss: Fix prototypes warnings.Andreas Schneider2011-08-101-1/+4
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: Do not try to force reload.Simo Sorce2011-08-102-3/+7
| | | | | | | | | | Be more correct in load printers at startup. If async process have already started we do not need to force a reload, but we just need to load the printers. If other process have not finished initializing it makes no sense to try to force them as they are masking SIGHUP unitl init is done anyway. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: do not call pcap_cache_reload() directlySimo Sorce2011-08-101-5/+17
| | | | | | | The background queue process is repsonsible for that. Just reload printers if necessary or wait for a message from bq to do that. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: Add child handler to bq processSimo Sorce2011-08-101-4/+32
| | | | | | | | The cups backend forks a child to do asynchronous work. We need a sigchld handler in bq to properly wait for the chilod to finish and reap it, otherwise it hangs the forever as a zombie process. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: Fix printers related messagingSimo Sorce2011-08-101-4/+34
| | | | | | | Children were not properly receiving messages to reload printers when the background queue process was dispatching them. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Fix use of child id.Simo Sorce2011-08-102-12/+11
| | | | | | | | | Children Ids must start at 1 as 0 represent the father. Also fix callbacks that restart logs to use a procedd global variable that holds the Id so that they work correctly both fot the parent process and the children. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: make sure to block SIGHUP ...Simo Sorce2011-08-102-4/+39
| | | | | | | | ... until we are ready to handle it. Also make us ready as early as possible in spoolssd. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: Use a global variable for the poolSimo Sorce2011-08-101-60/+31
| | | | | | | | | This allows for setting up signal handlers earlier which is needed for the following patch. It also simplify the code in a few places. After all we never have more than pool active at any time during spoolssd life span. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: Allow bq process to have own logfileSimo Sorce2011-08-103-26/+55
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolssd: Use the child_id to open log filesSimo Sorce2011-08-101-15/+43
| | | | | | | This way each child has its own log file and avoid mixing all logs form all children in the same parent log file. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Pass the child a child_idSimo Sorce2011-08-103-2/+4
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: Force pcap reload when all readySimo Sorce2011-08-104-5/+18
| | | | | | | This way we are sure the cache is primed properly and messages can be sent to processes if necessary as all messaging has been set up. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Return tsocket_address for client and serverSimo Sorce2011-08-103-32/+68
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Pass messaging context around tooSimo Sorce2011-08-103-20/+59
| | | | | | Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Set up a SIGCHLD handler by defaultSimo Sorce2011-08-103-52/+94
| | | | | | | | | | | We need to properly handle preforked children so it is better to just do that automatically. If the parent needs/wants to intercept SIGCHLD events it can set a callback that will be called by the prefork code once the internal cleanup function that checks all prefork children has been executed. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3:spoolssd Start spoolssd from printing_subsystem_initSimo Sorce2011-08-104-41/+70
| | | | | | | Use a child for the background updater process Forward printer update messages from spoolss to background update process. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: Rework how the background process is startedSimo Sorce2011-08-106-21/+42
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Provide a cleanup functionSimo Sorce2011-08-103-28/+25
| | | | | | | This way the parent doesn't need to know how to handle dead children and keeps all of that within the prefork abstraction. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: Inline Doxygen DocumentationSimo Sorce2011-08-101-0/+160
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: better timing out semanticsSimo Sorce2011-08-101-4/+14
| | | | | | | | | | | | | | | If this child has no clients, let the lock functions block for 1 second, and then immediately reschedule the operation. This means we catch the lock as soon as possible on a free child. If, instead, we are already serving a client, we want to be non blocking, so we timeout immediately on getting the lock, and then we sleep a 1/10th of a second. This means that a busy child will be slightly slower on picking up the lock, but we won't block the existing client from communicating with us as we immediately react to activity on the already opened file handler. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add support for multiple listning file descriptorsSimo Sorce2011-08-103-95/+84
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolssd: propagate SIGHUP to childrenSimo Sorce2011-08-101-11/+34
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: provide way to send a signal to all childrenSimo Sorce2011-08-102-0/+15
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolssd: expand children pool when necessarySimo Sorce2011-08-101-7/+34
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: provide means to expand the pool sizeSimo Sorce2011-08-102-0/+33
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolssd: Use parametric option for prefork parametersSimo Sorce2011-08-101-12/+48
| | | | | | | | | | | example: spoolssd:prefork = 10:100:5 will configure spoolssd to start with a minimum of 10 preforked children, a max set to 100 children and spawns/retires 5 children at a time when ramping up/scaling down. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: make listening asynchronousSimo Sorce2011-08-101-26/+60
| | | | | | | This also allows to make each children serve more than one client at the same time if necessary. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-spoolssd: Use the prefork framework in spoolssdSimo Sorce2011-08-101-3/+425
| | | | | | | This should make it more scalable and able to handle easily multiple clients at the same time. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-rpc_server: add termination functionSimo Sorce2011-08-102-3/+23
| | | | | | This way we can act when a client disconnects. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-rpc: Expose some internal functionsSimo Sorce2011-08-102-33/+44
| | | | | | This will allow to hook the prefork socket handlers to the rpc service. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add way to manage number of clients per childSimo Sorce2011-08-102-3/+38
| | | | | | | | The allowed_clients var is a parent managed variable that tell children how many clients they are allowed to handle at the same time. This way children can overcommit but within parent controlled limits. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: add asynchronous functionsSimo Sorce2011-08-102-1/+267
| | | | | | To get a client connection it is now possible to use asynchronous functions. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-prefork: implement prefork frameworkSimo Sorce2011-08-104-0/+580
| | | | | | | Primarily built for forked off rpc service daemons, but not tied to rpc services and generic enough to be used elsewhere easily. Signed-off-by: Andreas Schneider <asn@samba.org>
* s3-printing: No need to register to smbd's children listSimo Sorce2011-08-101-19/+0
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* tevent: cleanup nesting counter when doing a full reinit.Simo Sorce2011-08-101-0/+7
| | | | | | | We may be forking from within a loop, so we need to clean-up to avoid aborts when nesting is not allowed and we are in a new children. Signed-off-by: Andreas Schneider <asn@samba.org>