Changeset - 7c67ae7c57ca
[Not reviewed]
default
0 3 0
Nathan Brink (binki) - 16 years ago 2009-08-03 21:53:54
ohnobinki@ohnopublishing.net
added datadir config to server
3 files changed with 19 insertions and 2 deletions:
0 comments (0 inline, 0 general)
etc/distrenserver.conf
Show inline comments
 
@@ -7,3 +7,11 @@ me
 
}
 

	
 
include("distrencommon.conf")
 

	
 
datadir = "/var/lib/distren"
 

	
 
listen {
 
       type = "unix"
 
       path = "/var/run/distrend.sock"
 
       port = "0770"
 
}
 
\ No newline at end of file
etc/distrenslave.conf
Show inline comments
 
@@ -4,3 +4,5 @@ slave
 
}
 

	
 
include("distrencommon.conf")
 

	
 
datadir = "/var/lib/distren"
src/server/distrend.c
Show inline comments
 
@@ -74,6 +74,7 @@ struct distrend_config
 
  cfg_t *mycfg;
 
  struct options_common *options;
 
  struct distrend_listen **listens; /*< Null terminated array of structs */
 
  char *datadir;
 
};
 

	
 

	
 
@@ -463,15 +464,21 @@ void blendjob_remove(struct blendjob **h
 
	  cfg_opt_t myopts[] =
 
	    {
 
	      CFG_SEC("listen",  /* this must be imported into struct listens (which must still be declared) */
 
		      myopts_listen
 
		      ,
 
	      myopts_listen,
 
		      CFGF_MULTI),
 
      CFG_SIMPLE_STR("datadir", NULL),
 
	      CFG_END()
 
	    };
 

	
 
  fprintf(stderr, "%s:%d running config\n", __FILE__, __LINE__);
 

	
 
	  *config = malloc(sizeof(struct distrend_config));
 
  myopts[1].simple_value = &(*config)->datadir;
 
  
 
	  options_init(argc, argv, &(*config)->mycfg, myopts, "server", &(*config)->options);
 

	
 
  fprintf(stderr, "using %s as datadir\n", (*config)->datadir); 
 
  
 
	  return 0;
 
	}
 
	int distrend_config_free(struct distrend_config *config)
0 comments (0 inline, 0 general)