aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-12-11 10:21:39 +0100
committerChristian Grothoff <christian@grothoff.org>2018-12-11 10:21:39 +0100
commitee10b40c55c154400bbefd13175bd8b280cb7798 (patch)
treed475fcde922f4a5e413fb4b76c8784eb48fe71d3 /src/util/service.c
parent70ae2bd54ee0ff610d95a63856f38395920b804d (diff)
downloadgnunet-ee10b40c55c154400bbefd13175bd8b280cb7798.tar.gz
gnunet-ee10b40c55c154400bbefd13175bd8b280cb7798.zip
fail hard if configuration file specified via -c does not exist (in all services and programs)
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/service.c b/src/util/service.c
index b61168570..2dc7dd576 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -1177,7 +1177,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
1177 int flags; 1177 int flags;
1178 char dummy[2]; 1178 char dummy[2];
1179#endif 1179#endif
1180 1180
1181 if (GNUNET_CONFIGURATION_have_value 1181 if (GNUNET_CONFIGURATION_have_value
1182 (sh->cfg, 1182 (sh->cfg,
1183 sh->service_name, 1183 sh->service_name,
@@ -1837,9 +1837,12 @@ GNUNET_SERVICE_run_ (int argc,
1837 } 1837 }
1838 if (0 != strcmp (opt_cfg_filename, 1838 if (0 != strcmp (opt_cfg_filename,
1839 cfg_filename)) 1839 cfg_filename))
1840 {
1840 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1841 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1841 _("Could not access configuration file `%s'\n"), 1842 _("Could not access configuration file `%s'\n"),
1842 opt_cfg_filename); 1843 opt_cfg_filename);
1844 goto shutdown;
1845 }
1843 } 1846 }
1844 if (GNUNET_OK != setup_service (&sh)) 1847 if (GNUNET_OK != setup_service (&sh))
1845 goto shutdown; 1848 goto shutdown;