Changeset 745 for trunk/server/source3/torture/vfstest.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/torture/vfstest.c
r414 r745 25 25 26 26 #include "includes.h" 27 #include "smbd/smbd.h" 28 #include "popt_common.h" 27 29 #include "vfstest.h" 30 #include "../libcli/smbreadline/smbreadline.h" 28 31 29 32 /* List to hold groups of commands */ … … 32 35 struct cmd_set *cmd_set; 33 36 } *cmd_list; 34 35 int get_client_fd(void)36 {37 return -1;38 }39 37 40 38 /**************************************************************************** … … 192 190 193 191 if (argc == 2) { 194 DEBUGLEVEL = atoi(argv[1]);192 lp_set_cmdline("log level", argv[1]); 195 193 } 196 194 … … 415 413 } 416 414 417 static int server_fd = -1;418 415 int 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 }480 416 481 417 struct event_context *smbd_event_context(void) … … 487 423 } 488 424 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 (!cache507 && !(cache = memcache_init(NULL,508 lp_max_stat_cache_size()*1024))) {509 510 smb_panic("Could not init smbd memcache");511 }512 return cache;513 425 } 514 426 … … 547 459 poptFreeContext(pc); 548 460 461 lp_load_initial_only(get_dyn_CONFIGFILE()); 462 549 463 /* TODO: check output */ 550 reload_services( False);464 reload_services(smbd_messaging_context(), -1, False); 551 465 552 466 /* the following functions are part of the Samba debugging 553 467 facilities. See lib/debug.c */ 554 setup_logging("vfstest", True);468 setup_logging("vfstest", DEBUG_STDOUT); 555 469 556 470 /* Load command lists */
Note:
See TracChangeset
for help on using the changeset viewer.