Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/torture/vfstest.c

    r414 r745  
    2525
    2626#include "includes.h"
     27#include "smbd/smbd.h"
     28#include "popt_common.h"
    2729#include "vfstest.h"
     30#include "../libcli/smbreadline/smbreadline.h"
    2831
    2932/* List to hold groups of commands */
     
    3235        struct cmd_set *cmd_set;
    3336} *cmd_list;
    34 
    35 int get_client_fd(void)
    36 {
    37         return -1;
    38 }
    3937
    4038/****************************************************************************
     
    192190
    193191        if (argc == 2) {
    194                 DEBUGLEVEL = atoi(argv[1]);
     192                lp_set_cmdline("log level", argv[1]);
    195193        }
    196194
     
    415413}
    416414
    417 static int server_fd = -1;
    418415int last_message = -1;
    419 
    420 int smbd_server_fd(void)
    421 {
    422                 return server_fd;
    423 }
    424 
    425 void reload_printers(void)
    426 {
    427         return;
    428 }
    429 
    430 /****************************************************************************
    431  Reload the services file.
    432 **************************************************************************/
    433 
    434 bool reload_services(bool test)
    435 {
    436         bool ret;
    437 
    438         if (lp_loaded()) {
    439                 const char *fname = lp_configfile();
    440                 if (file_exist(fname) &&
    441                     !strcsequal(fname, get_dyn_CONFIGFILE())) {
    442                         set_dyn_CONFIGFILE(fname);
    443                         test = False;
    444                 }
    445         }
    446 
    447         reopen_logs();
    448 
    449         if (test && !lp_file_list_changed())
    450                 return(True);
    451 
    452         lp_killunused(conn_snum_used);
    453 
    454         ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True);
    455 
    456         /* perhaps the config filename is now set */
    457         if (!test)
    458                 reload_services(True);
    459 
    460         reopen_logs();
    461 
    462         load_interfaces();
    463 
    464         {
    465                 if (smbd_server_fd() != -1) {     
    466                         set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
    467                         set_socket_options(smbd_server_fd(),
    468                                            lp_socket_options());
    469                 }
    470         }
    471 
    472         mangle_reset_cache();
    473         reset_stat_cache();
    474 
    475         /* this forces service parameters to be flushed */
    476         set_current_service(NULL,0,True);
    477 
    478         return (ret);
    479 }
    480416
    481417struct event_context *smbd_event_context(void)
     
    487423        }
    488424        return ctx;
    489 }
    490 
    491 struct messaging_context *smbd_messaging_context(void)
    492 {
    493         static struct messaging_context *ctx;
    494 
    495         if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
    496                                            smbd_event_context()))) {
    497                 smb_panic("Could not init smbd messaging context\n");
    498         }
    499         return ctx;
    500 }
    501 
    502 struct memcache *smbd_memcache(void)
    503 {
    504         static struct memcache *cache;
    505 
    506         if (!cache
    507             && !(cache = memcache_init(NULL,
    508                                        lp_max_stat_cache_size()*1024))) {
    509 
    510                 smb_panic("Could not init smbd memcache");
    511         }
    512         return cache;
    513425}
    514426
     
    547459        poptFreeContext(pc);
    548460
     461        lp_load_initial_only(get_dyn_CONFIGFILE());
     462
    549463        /* TODO: check output */
    550         reload_services(False);
     464        reload_services(smbd_messaging_context(), -1, False);
    551465
    552466        /* the following functions are part of the Samba debugging
    553467           facilities.  See lib/debug.c */
    554         setup_logging("vfstest", True);
     468        setup_logging("vfstest", DEBUG_STDOUT);
    555469       
    556470        /* Load command lists */
Note: See TracChangeset for help on using the changeset viewer.