Ver código fonte

Add warning to lines that ends with semicolon

Mészáros Mihály 7 anos atrás
pai
commit
7e782a56a1
2 arquivos alterados com 6 adições e 1 exclusões
  1. 2 1
      ChangeLog
  2. 4 0
      src/apps/relay/mainrelay.c

+ 2 - 1
ChangeLog

@@ -19,7 +19,8 @@ Version 4.5.0.8 'dan Eider':
 	- Fixed typos in postinstall.txt (by Prashanth Rajaram)
 	- MySQL password encryption (by Mustafa Bingül & Erdem Duman)
 	- Do not write to log before logging configuration is read from a config file (by eiver)
-	- Add more explanation on use-auth-secret REST in example confi in example configg
+	- Add more explanation on use-auth-secret / REST in example config (by Krithin Sitaram)
+	- Add a Warning if lines in config file ends with semicolon (by heyheyjc)n
 
 12/10/2017 Oleg Moskalenko <[email protected]>
 Version 4.5.0.7 'dan Eider':

+ 4 - 0
src/apps/relay/mainrelay.c

@@ -1639,6 +1639,10 @@ static void read_config_file(int argc, char **argv, int pass)
 					} else if((pass > 0) && (c == 'u')) {
 					  set_option(c, value);
 					}
+					if (s[slen - 1] == 59) {
+						TURN_LOG_FUNC(TURN_LOG_LEVEL_WARNING, "Check config! The following line ends with semicolon: \"%s\" \n",s);
+					}
+
 				}
 			}