Changeset - 83227db1cee8
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-09 01:27:24
ohnobinki@ohnopublishing.net
fixed some basic confuse arrays, fixed #include order
1 file changed with 15 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -27,10 +27,11 @@
 
 */
 

	
 

	
 
#include <stdio.h>
 
#include "execio.h"
 
#include "options.h"
 
#include <confuse.h>
 
#include <stdio.h>
 
#include <malloc.h>
 

	
 
#define MAX_BLENDJOBS 100 // maximum number of stored jobs in memory, per job type (lux/blend). Eventually we can dump this data to disk, or atleast the remainder not in memory...
 

	
 
@@ -112,20 +113,24 @@ int main(int argc, char *argv[])
 
// Begin non-working framework?
 
	int distrend_do_config(int argc, char *argv[], struct distrend_config *config)
 
	{
 
	  cfg_opt_t myopts =
 
	    {
 
	      CFG_SEC("listen",  /* this must be imported into struct listens (which must still be declared) */
 
	  cfg_opt_t myopts_listen[] = 
 
	    {
 
	      CFG_SIMPLE_STR("type", NULL),
 
		CFG_SIMPLE_STR("path", NULL),
 
		CFG_SIMPLE_INT("port", NULL)
 
		},
 
	      CFG_SIMPLE_STR("path", NULL),
 
	      CFG_SIMPLE_INT("port", NULL),
 
	      CFG_END()
 
	  };
 
	  cfg_opt_t myopts[] =
 
	    {
 
	      CFG_SEC("listen",  /* this must be imported into struct listens (which must still be declared) */
 
		      myopts_listen
 
		      ,
 
		      CFGF_MULTI),
 
	      CFG_END
 
	      CFG_END()
 
	    };
 

	
 
	  config = malloc(sizeof(struct distrend_config));
 
	  options_init(argc, argv, &config->mycfg, &myopts, "server", &config->options);
 
	  options_init(argc, argv, &config->mycfg, myopts, "server", &config->options);
 

	
 
	  return 0;
 
	}
 
@@ -143,7 +148,7 @@ int main(int argc, char *argv[])
 
  int cont = 1;
 
  struct distrend_listenset *listenset;
 
  struct distrend_config *config;
 
  distrend_do_config(argc, argv, &config);
 
  distrend_do_config(argc, argv, config);
 

	
 
  distrend_listen(&listenset, config);
 
  /* This is called the ``main loop'' */
0 comments (0 inline, 0 general)