Changeset - 310bb2a4501e
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-25 00:40:35
ohnobinki@ohnopublishing.net
added default ssh-command value
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/common/options.c
Show inline comments
 
@@ -76,25 +76,26 @@ int options_init(int argc, char *argv[],
 
  memset((*allopts)->data, '\0', sizeof(struct options_common_data));
 

	
 
  (*allopts)->remoteio = malloc(sizeof(struct remoteio_opts));
 
  if(!(*allopts)->data)
 
    {
 
      perror("malloc");
 
      free(configfile);
 
      free((*allopts)->data);
 
      free(*allopts);
 
      return 1;
 
    }
 
  memset((*allopts)->remoteio, '\0', sizeof(struct remoteio_opts));
 
  
 
  (*allopts)->remoteio->ssh_command = strdup("ssh");
 
  /** @TODO: check for NULL return above */
 
  
 
  cfg_opt_t common_opts[] =
 
    {
 
      CFG_SIMPLE_STR("ssh-command", &(*allopts)->remoteio->ssh_command),
 
      CFG_END()
 
    };
 
  
 
  /*
 
    In these arrays, I should replace NULL with a pointer to a string in the struct which should hold the result of confuse processing an option. This is partially because confuse will not free the values it parses.
 
   */
 
  cfg_opt_t server_opts[] = 
 
    {
0 comments (0 inline, 0 general)