#endif
/* the max number of simultanous connections to the server by all clients */
-#define MAXSTATUS 100000
+/* zero means no limit. */
+#define MAXSTATUS 0
#define WORDMAX 0xFFFF
/* Child. */
DEBUG(5,("start_background_queue: background LPQ thread started\n"));
- claim_connection(NULL,"smbd lpq backend",MAXSTATUS,False);
+ claim_connection(NULL,"smbd lpq backend",0,False);
- if (!locking_init(0)) {
+ if (!locking_init(0))
exit(1);
- }
- if (!print_backend_init()) {
+ if (!print_backend_init())
exit(1);
- }
message_register(MSG_PRINTER_UPDATE, print_queue_receive);
Delete a connection record.
****************************************************************************/
-BOOL yield_connection(connection_struct *conn,char *name,int max_connections)
+BOOL yield_connection(connection_struct *conn,char *name)
{
struct connections_key key;
TDB_DATA kbuf;
invalidate_all_vuids();
/* delete our entry in the connections database. */
- yield_connection(NULL,"",MAXSTATUS);
+ yield_connection(NULL,"");
respond_to_all_remaining_local_messages();
decrement_smbd_process_count();
register_dmalloc_msgs();
/* Setup the main smbd so that we can get messages. */
- claim_connection(NULL,"",MAXSTATUS,True);
+ claim_connection(NULL,"",0,True);
/*
DO NOT ENABLE THIS TILL YOU COPE WITH KILLING THESE TASKS AND INETD
* everything after this point is run after the fork()
*/
- if (!locking_init(0)) {
+ if (!locking_init(0))
exit(1);
- }
- if (!print_backend_init()) {
+ if (!print_backend_init())
exit(1);
- }
- if (!share_info_db_init()) {
+ if (!share_info_db_init())
exit(1);
- }
- if(!initialize_password_db(False)) {
+ if(!initialize_password_db(False))
exit(1);
- }
/* possibly reload the services file. */
reload_services(True);
}
/* Setup oplocks */
- if (!init_oplocks()) {
+ if (!init_oplocks())
exit(1);
- }
/* Setup mangle */
- if (!init_mangle_tdb()) {
+ if (!init_mangle_tdb())
exit(1);
- }
/* Setup change notify */
- if (!init_change_notify()) {
+ if (!init_change_notify())
exit(1);
- }
smbd_process();
ret = smbrun(cmd,NULL);
if (ret != 0 && lp_rootpreexec_close(SNUM(conn))) {
DEBUG(1,("root preexec gave %d - failing connection\n", ret));
- yield_connection(conn,
- lp_servicename(SNUM(conn)),
- lp_max_connections(SNUM(conn)));
+ yield_connection(conn, lp_servicename(SNUM(conn)));
conn_free(conn);
*status = NT_STATUS_UNSUCCESSFUL;
return NULL;
if (ret != 0 && lp_preexec_close(SNUM(conn))) {
DEBUG(1,("preexec gave %d - failing connection\n", ret));
change_to_root_user();
- yield_connection(conn, lp_servicename(SNUM(conn)), lp_max_connections(SNUM(conn)));
+ yield_connection(conn, lp_servicename(SNUM(conn)));
conn_free(conn);
*status = NT_STATUS_UNSUCCESSFUL;
return NULL;
remote_machine, conn->client_address,
conn->connectpath,strerror(errno)));
change_to_root_user();
- yield_connection(conn,
- lp_servicename(SNUM(conn)),
- lp_max_connections(SNUM(conn)));
+ yield_connection(conn, lp_servicename(SNUM(conn)));
conn_free(conn);
*status = NT_STATUS_BAD_NETWORK_NAME;
return NULL;
}
- yield_connection(conn,
- lp_servicename(SNUM(conn)),
- lp_max_connections(SNUM(conn)));
+ yield_connection(conn, lp_servicename(SNUM(conn)));
file_close_conn(conn);
dptr_closecnum(conn);