FreeCalypso > hg > themwi-system-sw
comparison sip-in/readconf.c @ 92:a9137bdb6047
sip-in: make BYE Max-Forwards configurable
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 23 Sep 2022 19:18:07 -0800 |
parents | fd23e2747b45 |
children | ce3b1db7d1d7 |
comparison
equal
deleted
inserted
replaced
91:fd23e2747b45 | 92:a9137bdb6047 |
---|---|
17 struct in_addr sip_bind_ip; | 17 struct in_addr sip_bind_ip; |
18 unsigned sip_bind_port; | 18 unsigned sip_bind_port; |
19 int cfg_use_100rel; | 19 int cfg_use_100rel; |
20 unsigned cfg_retrans_timeout = 500; | 20 unsigned cfg_retrans_timeout = 500; |
21 unsigned cfg_retrans_count = 10; | 21 unsigned cfg_retrans_count = 10; |
22 unsigned max_forwards = 70; | |
22 | 23 |
23 static char config_file_pathname[] = "/var/gsm/themwi-sip-in.cfg"; | 24 static char config_file_pathname[] = "/var/gsm/themwi-sip-in.cfg"; |
24 | 25 |
25 struct parse_state { | 26 struct parse_state { |
26 int lineno; | 27 int lineno; |
166 set_id = 0; | 167 set_id = 0; |
167 } else if (!strcmp(kw, "sip-udp-retrans")) { | 168 } else if (!strcmp(kw, "sip-udp-retrans")) { |
168 handler = handle_retrans_conf; | 169 handler = handle_retrans_conf; |
169 var = (void *) 0; | 170 var = (void *) 0; |
170 set_id = 0; | 171 set_id = 0; |
172 } else if (!strcmp(kw, "max-forwards")) { | |
173 handler = &handle_num; | |
174 var = &max_forwards; | |
175 set_id = 0; | |
171 } else { | 176 } else { |
172 fprintf(stderr, "%s line %d: non-understood keyword \"%s\"\n", | 177 fprintf(stderr, "%s line %d: non-understood keyword \"%s\"\n", |
173 config_file_pathname, st->lineno, kw); | 178 config_file_pathname, st->lineno, kw); |
174 exit(1); | 179 exit(1); |
175 } | 180 } |