@@ -515,7 +515,7 @@ static int check_via_path (char *via_path)
515
515
516
516
r = stemp ;
517
517
while (( a = strsep (& r ,"," )) != NULL ) {
518
- int strict = 1 ;
518
+ int strict = 2 ;
519
519
int ok ;
520
520
char addr [AX25_MAX_ADDR_LEN ];
521
521
int ssid ;
@@ -892,6 +892,8 @@ void config_init (char *fname, struct audio_s *p_audio_config,
892
892
p_misc_config -> maxframe_extended = AX25_K_MAXFRAME_EXTENDED_DEFAULT ; /* Max frames to send before ACK. mod 128 "Window" size. */
893
893
894
894
p_misc_config -> maxv22 = AX25_N2_RETRY_DEFAULT / 2 ; /* Max SABME before falling back to SABM. */
895
+ p_misc_config -> v20_addrs = NULL ; /* Go directly to v2.0 for stations listed. */
896
+ p_misc_config -> v20_count = 0 ;
895
897
896
898
/*
897
899
* Try to extract options from a file.
@@ -1193,6 +1195,24 @@ void config_init (char *fname, struct audio_s *p_audio_config,
1193
1195
}
1194
1196
else {
1195
1197
1198
+ char * p ;
1199
+ int const strict = 2 ;
1200
+ char call_no_ssid [AX25_MAX_ADDR_LEN ];
1201
+ int ssid , heard ;
1202
+
1203
+ for (p = t ; * p != '\0' ; p ++ ) {
1204
+ if (islower (* p )) {
1205
+ * p = toupper (* p ); /* Silently force upper case. */
1206
+ /* Might change to warning someday. */
1207
+ }
1208
+ }
1209
+
1210
+ if ( ! ax25_parse_addr (-1 , t , strict , call_no_ssid , & ssid , & heard )) {
1211
+ text_color_set (DW_COLOR_ERROR );
1212
+ dw_printf ("Config file: Invalid value for MYCALL command on line %d.\n" , line );
1213
+ continue ;
1214
+ }
1215
+
1196
1216
// Definitely set for current channel.
1197
1217
// Set for other channels which have not been set yet.
1198
1218
@@ -1205,17 +1225,7 @@ void config_init (char *fname, struct audio_s *p_audio_config,
1205
1225
strcasecmp (p_audio_config -> achan [c ].mycall , "NOCALL" ) == 0 ||
1206
1226
strcasecmp (p_audio_config -> achan [c ].mycall , "N0CALL" ) == 0 ) {
1207
1227
1208
- char * p ;
1209
-
1210
1228
strlcpy (p_audio_config -> achan [c ].mycall , t , sizeof (p_audio_config -> achan [c ].mycall ));
1211
-
1212
- for (p = p_audio_config -> achan [c ].mycall ; * p != '\0' ; p ++ ) {
1213
- if (islower (* p )) {
1214
- * p = toupper (* p ); /* silently force upper case. */
1215
- }
1216
- }
1217
- // TODO: additional checks if valid.
1218
- // Should have a function to check for valid callsign[-ssid]
1219
1229
}
1220
1230
}
1221
1231
}
@@ -3920,6 +3930,9 @@ void config_init (char *fname, struct audio_s *p_audio_config,
3920
3930
3921
3931
/*
3922
3932
* IGFILTER - IGate Server side filters.
3933
+ * Is this name too confusing. Too similar to FILTER IG 0 ...
3934
+ * Maybe SSFILTER suggesting Server Side.
3935
+ * SUBSCRIBE might be better because it's not a filter that limits.
3923
3936
*
3924
3937
* IGFILTER filter-spec ...
3925
3938
*/
@@ -3928,6 +3941,12 @@ void config_init (char *fname, struct audio_s *p_audio_config,
3928
3941
3929
3942
t = split (NULL ,1 ); /* Take rest of line as one string. */
3930
3943
3944
+ if (p_igate_config -> t2_filter != NULL ) {
3945
+ text_color_set (DW_COLOR_ERROR );
3946
+ dw_printf ("Line %d: Warning - Earlier IGFILTER value will be replaced by this one.\n" , line );
3947
+ continue ;
3948
+ }
3949
+
3931
3950
if (t != NULL && strlen (t ) > 0 ) {
3932
3951
p_igate_config -> t2_filter = strdup (t );
3933
3952
}
@@ -4562,6 +4581,41 @@ void config_init (char *fname, struct audio_s *p_audio_config,
4562
4581
}
4563
4582
4564
4583
4584
+ /*
4585
+ * V20 address [ address ... ] - Stations known to support only AX.25 v2.0.
4586
+ * When connecting to these, skip SABME and go right to SABM.
4587
+ * Possible to have multiple and they are cummulative.
4588
+ */
4589
+
4590
+ else if (strcasecmp (t , "V20" ) == 0 ) {
4591
+
4592
+ t = split (NULL ,0 );
4593
+ if (t == NULL ) {
4594
+ text_color_set (DW_COLOR_ERROR );
4595
+ dw_printf ("Line %d: Missing address(es) for V20.\n" , line );
4596
+ continue ;
4597
+ }
4598
+
4599
+ while (t != NULL ) {
4600
+ int const strict = 2 ;
4601
+ char call_no_ssid [AX25_MAX_ADDR_LEN ];
4602
+ int ssid , heard ;
4603
+
4604
+ if (ax25_parse_addr (AX25_DESTINATION , t , strict , call_no_ssid , & ssid , & heard )) {
4605
+ p_misc_config -> v20_addrs = (char * * )realloc (p_misc_config -> v20_addrs , sizeof (char * ) * (p_misc_config -> v20_count + 1 ));
4606
+ p_misc_config -> v20_addrs [p_misc_config -> v20_count ++ ] = strdup (t );
4607
+ }
4608
+ else {
4609
+ text_color_set (DW_COLOR_ERROR );
4610
+ dw_printf ("Line %d: Invalid station address for V20 command.\n" , line );
4611
+
4612
+ // continue processing any others following.
4613
+ }
4614
+ t = split (NULL ,0 );
4615
+ }
4616
+ }
4617
+
4618
+
4565
4619
/*
4566
4620
* Invalid command.
4567
4621
*/
0 commit comments