]> git.sur5r.net Git - tio/blobdiff - src/configfile.c
Update upstream source from tag 'upstream/2.3'
[tio] / src / configfile.c
index e749e4b49f9453a362d2f50ea790f5bc0545e662..8e29a26d2bfcb2b0c3b20df1be9954d7e361b4c1 100644 (file)
@@ -112,7 +112,7 @@ static int data_handler(void *user, const char *section, const char *name,
     if (!strcmp(section, c.section_name))
     {
         // Set configuration parameter if found
-        if (!strcmp(name, "tty"))
+        if (!strcmp(name, "device") || !strcmp(name, "tty"))
         {
             asprintf(&c.tty, value, c.match);
             option.tty_device = c.tty;
@@ -302,6 +302,17 @@ static int data_handler(void *user, const char *section, const char *name,
         {
             option.alert = alert_option_parse(value);
         }
+        else if (!strcmp(name, "mute"))
+        {
+            if (!strcmp(value, "enable"))
+            {
+                option.mute = true;
+            }
+            else if (!strcmp(value, "disable"))
+            {
+                option.mute = false;
+            }
+        }
     }
 
     return 0;
@@ -493,7 +504,7 @@ void config_file_print(void)
 {
     if (c.path != NULL)
     {
-        tio_printf(" Path: %s", c.path);
+        tio_printf(" Active configuration file: %s", c.path);
         if (c.section_name != NULL)
         {
             tio_printf(" Active sub-configuration: %s", c.section_name);