Skip to content

Commit a9d2e7b

Browse files
committed
Enhanced IGate.
1 parent d0cf040 commit a9d2e7b

File tree

3 files changed

+523
-177
lines changed

3 files changed

+523
-177
lines changed

src/config.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4623,15 +4623,27 @@ void config_init (char *fname, struct audio_s *p_audio_config,
46234623
* IGSERVER hostname [ port ] -- original implementation.
46244624
*
46254625
* IGSERVER hostname:port -- more in line with usual conventions.
4626+
*
4627+
* Beginning in version 1.8 we will also recognize CWOPSERVER.
4628+
* The only difference, in this file, is that we set cwop_mode.
4629+
* Of course the IGate code acts quite differently.
46264630
*/
46274631

4628-
else if (strcasecmp(t, "IGSERVER") == 0) {
4632+
else if (strcasecmp(t, "IGSERVER") == 0 || strcasecmp(t, "CWOPSERVER") == 0) {
4633+
if (strcasecmp(t, "CWOPSERVER") == 0) {
4634+
p_igate_config->cwop_mode = 1;
4635+
}
46294636
t = split(NULL,0);
46304637
if (t == NULL) {
46314638
text_color_set(DW_COLOR_ERROR);
46324639
dw_printf ("Line %d: Missing IGate server name for IGSERVER command.\n", line);
46334640
continue;
46344641
}
4642+
if (strlen(p_igate_config->t2_server_name) > 0) {
4643+
text_color_set(DW_COLOR_ERROR);
4644+
dw_printf ("Line %d: Only one of IGSERVER and CWOPSERVER can be specified.\n", line);
4645+
continue;
4646+
}
46354647
strlcpy (p_igate_config->t2_server_name, t, sizeof(p_igate_config->t2_server_name));
46364648

46374649
/* If there is a : in the name, split it out as the port number. */
@@ -4877,7 +4889,7 @@ void config_init (char *fname, struct audio_s *p_audio_config,
48774889

48784890
else if (strcasecmp(t, "SATGATE") == 0) {
48794891

4880-
text_color_set(DW_COLOR_INFO);
4892+
text_color_set(DW_COLOR_ERROR);
48814893
dw_printf ("Line %d: SATGATE is pretty useless and will be removed in a future version.\n", line);
48824894

48834895
t = split(NULL,0);

0 commit comments

Comments
 (0)