Răsfoiți Sursa

Print version only, no extra lines (#1441)

Before
<img width="615" alt="Screenshot 2024-03-02 at 2 47 48 PM"
src="https://github.com/coturn/coturn/assets/2505440/c3f01e97-914c-4391-af32-d3442d265e90">

After
<img width="402" alt="Screenshot 2024-03-02 at 2 47 28 PM"
src="https://github.com/coturn/coturn/assets/2505440/ce3deb7b-5f70-4158-8cd9-eceae0dcc995">
Pavel Punsky 1 an în urmă
părinte
comite
edebb9ad05
1 a modificat fișierele cu 9 adăugiri și 8 ștergeri
  1. 9 8
      src/apps/relay/mainrelay.c

+ 9 - 8
src/apps/relay/mainrelay.c

@@ -3003,6 +3003,15 @@ int main(int argc, char **argv) {
   turn_params.no_dtls = 1;
 #endif
 
+  if (strstr(argv[0], "turnadmin")) {
+    return adminmain(argc, argv);
+  }
+
+  // Zero pass apply the log options.
+  read_config_file(argc, argv, 0);
+  // First pass read other config options
+  read_config_file(argc, argv, 1);
+
   {
     int cpus = get_system_number_of_cpus();
     if (0 < cpus) {
@@ -3023,14 +3032,6 @@ int main(int argc, char **argv) {
   memset(&turn_params.default_users_db, 0, sizeof(default_users_db_t));
   turn_params.default_users_db.ram_db.static_accounts = ur_string_map_create(free);
 
-  if (strstr(argv[0], "turnadmin")) {
-    return adminmain(argc, argv);
-  }
-  // Zero pass apply the log options.
-  read_config_file(argc, argv, 0);
-  // First pass read other config options
-  read_config_file(argc, argv, 1);
-
   struct uoptions uo;
   uo.u.m = long_options;