ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/conf.C
(Generate patch)

Comparing gvpe/src/conf.C (file contents):
Revision 1.60 by root, Sat Jul 13 04:10:29 2013 UTC vs.
Revision 1.61 by root, Tue Jul 16 16:44:36 2013 UTC

636 636
637 fclose (f); 637 fclose (f);
638 } 638 }
639 else 639 else
640 { 640 {
641 slog (need_keys ? L_ERR : L_NOTICE, _("unable to open private rsa key file '%s': %s"), fname, strerror (errno));
642
643 if (need_keys) 641 if (need_keys)
642 {
643 slog (need_keys ? L_ERR : L_NOTICE, _("unable to open private rsa key file '%s': %s"), fname, strerror (errno));
644 exit (EXIT_FAILURE); 644 exit (EXIT_FAILURE);
645 }
645 } 646 }
646 647
647 free (fname); 648 free (fname);
648 649
649 if (need_keys && ::thisnode 650 if (need_keys && ::thisnode
653 { 654 {
654 slog (L_NOTICE, _("private hostkey and public node key mismatch: is '%s' the correct node?"), ::thisnode); 655 slog (L_NOTICE, _("private hostkey and public node key mismatch: is '%s' the correct node?"), ::thisnode);
655 exit (EXIT_FAILURE); 656 exit (EXIT_FAILURE);
656 } 657 }
657 658
659 fname = conf.config_filename (conf.pidfilename);
660 free (conf.pidfilename); conf.pidfilename = fname;
661
658 for (configuration::node_vector::iterator i = conf.nodes.begin(); i != conf.nodes.end(); ++i) 662 for (configuration::node_vector::iterator i = conf.nodes.begin(); i != conf.nodes.end(); ++i)
659 (*i)->finalise (); 663 (*i)->finalise ();
660} 664}
661 665
662char * 666char *
663configuration::config_filename (const char *name, const char *dflt) 667configuration::config_filename (const char *name, const char *dflt)
664{ 668{
665 char *fname; 669 char *fname;
666 670
667 asprintf (&fname, name ? name : dflt, ::thisnode); 671 asprintf (&fname, name ? name : dflt, ::thisnode ? ::thisnode : "<unset>");
668 672
669 if (!ABSOLUTE_PATH (fname)) 673 if (!ABSOLUTE_PATH (fname))
670 { 674 {
671 char *rname = fname; 675 char *rname = fname;
672 asprintf (&fname, "%s/%s", confbase, rname); 676 asprintf (&fname, "%s/%s", confbase, rname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines