From 9327ec51d11855ec0ceac3ce1f4e0a75c8b57081 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Jan 2005 01:32:56 +0000 Subject: r4728: split up server_services into: - stream_socket services the smb, ldap and rpc service which sets up a srtam socket end then waits for connections and - task services which this you can create a seperate task that do something (this is also going through the process_model subsystem so with -M standard a new process for this created with -M thread a new thread ... I'll add datagram services later when we whave support for datagram sockets in lib/socket/ see the next commit as an example for service_task's metze (This used to be commit d5fa02746c6569b09b6e05785642da2fad3ba3e0) --- source4/smb_server/service.c | 48 -------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'source4/smb_server/service.c') diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c index 1aa41d17a8..d4386ca77b 100644 --- a/source4/smb_server/service.c +++ b/source4/smb_server/service.c @@ -72,54 +72,6 @@ static int find_service(const char *service) iService = lp_servicenumber(service); - /* If we still don't have a service, attempt to add it as a printer. */ - if (iService == -1) { - int iPrinterService; - - if ((iPrinterService = lp_servicenumber(PRINTERS_NAME)) >= 0) { - const char *pszTemp; - - DEBUG(3,("checking whether %s is a valid printer name...\n", service)); - pszTemp = lp_printcapname(); - if ((pszTemp != NULL) && pcap_printername_ok(service, pszTemp)) { - DEBUG(3,("%s is a valid printer name\n", service)); - DEBUG(3,("adding %s as a printer service\n", service)); - lp_add_printer(service, iPrinterService); - iService = lp_servicenumber(service); - if (iService < 0) - DEBUG(0,("failed to add %s as a printer service!\n", service)); - } else { - DEBUG(3,("%s is not a valid printer name\n", service)); - } - } - } - - /* Check for default vfs service? Unsure whether to implement this */ - if (iService == -1) { - } - - /* just possibly it's a default service? */ - if (iService == -1) { - const char *pdefservice = lp_defaultservice(); - if (pdefservice && *pdefservice && - !strequal(pdefservice,service) && - !strstr(service,"..")) { - /* - * We need to do a local copy here as lp_defaultservice() - * returns one of the rotating lp_string buffers that - * could get overwritten by the recursive find_service() call - * below. Fix from Josef Hinteregger . - */ - pstring defservice; - pstrcpy(defservice, pdefservice); - iService = find_service(defservice); - if (iService >= 0) { - /* REWRITE: all_string_sub(service, "_","/",0); */ - iService = lp_add_service(service, iService); - } - } - } - if (iService >= 0 && !VALID_SNUM(iService)) { DEBUG(0,("Invalid snum %d for %s\n",iService, service)); iService = -1; -- cgit