@@ -4535,13 +4535,6 @@ void config_init (char *fname, struct audio_s *p_audio_config,
4535
4535
continue ;
4536
4536
}
4537
4537
4538
- if (tcp_port == 0 ) {
4539
- // If existing config files have KISSPORT 0, ignore it and move on
4540
- text_color_set (DW_COLOR_ERROR );
4541
- dw_printf ("Line %d: Warning: KISSPORT 0 setting no longer needed.\n" , line );
4542
- continue ;
4543
- }
4544
-
4545
4538
t = split (NULL ,0 );
4546
4539
if (t != NULL ) {
4547
4540
chan = atoi (t );
@@ -4552,6 +4545,16 @@ void config_init (char *fname, struct audio_s *p_audio_config,
4552
4545
}
4553
4546
}
4554
4547
4548
+ // KISSPORT == 0, if slot 0 still unset, disable setting of default
4549
+ // Use kiss_chan == -2 to indicate default disabled
4550
+ // Subsequent KISSPORT settings can still overwrite this slot
4551
+ if (tcp_port == 0 ) {
4552
+ if (p_misc_config -> kiss_port [0 ] == 0 ) {
4553
+ p_misc_config -> kiss_chan [0 ] = -2 ; // Don't set default
4554
+ }
4555
+ continue ;
4556
+ }
4557
+
4555
4558
// Try to find an empty slot.
4556
4559
// A duplicate TCP port number will overwrite the previous value.
4557
4560
@@ -5352,9 +5355,11 @@ void config_init (char *fname, struct audio_s *p_audio_config,
5352
5355
p_misc_config -> maxv22 = p_misc_config -> retry / 3 ;
5353
5356
}
5354
5357
5355
- /* If no kiss port specified, add default to first slot */
5356
- if (p_misc_config -> kiss_port [0 ] == 0 ) {
5358
+ // If no kiss port specified, add default to first slot
5359
+ // kiss_chan == -2 in slot 0 means a KISSPORT of 0 was set in config
5360
+ if (p_misc_config -> kiss_port [0 ] == 0 && p_misc_config -> kiss_chan [0 ] != -2 ) {
5357
5361
p_misc_config -> kiss_port [0 ] = DEFAULT_KISS_PORT ;
5362
+ p_misc_config -> kiss_chan [0 ] = -1 ;
5358
5363
}
5359
5364
5360
5365
} /* end config_init */
0 commit comments