diff mplayer.c @ 34172:5761a9a31bcb

Sanitize include option behaviour. If the file could not be opened/read/processed, print a message and quit instead of completely silently ignoring it.
author reimar
date Tue, 25 Oct 2011 20:45:09 +0000
parents 3959e81b0bcb
children aa8061d708b9
line wrap: on
line diff
--- a/mplayer.c	Tue Oct 25 20:42:50 2011 +0000
+++ b/mplayer.c	Tue Oct 25 20:45:09 2011 +0000
@@ -859,7 +859,7 @@
     char *conffile;
     int conffile_fd;
     if (!disable_system_conf &&
-        m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
+        m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf", 1) < 0)
         exit_player(EXIT_NONE);
     if ((conffile = get_path("")) == NULL) {
         mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_NoHomeDir);
@@ -879,7 +879,7 @@
                 close(conffile_fd);
             }
             if (!disable_user_conf &&
-                m_config_parse_config_file(conf, conffile) < 0)
+                m_config_parse_config_file(conf, conffile, 1) < 0)
                 exit_player(EXIT_NONE);
             free(conffile);
         }
@@ -956,7 +956,7 @@
     if (stat(file, &st))
         return 0;
     mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_LoadingConfig, file);
-    m_config_parse_config_file(conf, file);
+    m_config_parse_config_file(conf, file, 0);
     return 1;
 }