]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Reopen debug log file upon receipt of SIGHUP signal
authorLubomir Rintel <lkundrak@v3.sk>
Fri, 23 Oct 2015 16:02:42 +0000 (18:02 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 25 Oct 2015 18:45:02 +0000 (20:45 +0200)
This is useful for logrotate to be able to rotate the file even if the
control interface is not enabled (e.g., when using DBus).

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
wpa_supplicant/wpa_supplicant.c

index f5d73862f6762c7902cdc285f011e15193b0e8ca..7631a7940db885197a7286e1401b93265a1544e0 100644 (file)
@@ -963,6 +963,11 @@ static void wpa_supplicant_reconfig(int sig, void *signal_ctx)
                        wpa_supplicant_terminate_proc(global);
                }
        }
+
+       if (wpa_debug_reopen_file() < 0) {
+               /* Ignore errors since we cannot really do much to fix this */
+               wpa_printf(MSG_DEBUG, "Could not reopen debug log file");
+       }
 }