From: David Sommerseth <d...@users.sourceforge.net>

Avoids using M_FATAL, which will terminate the OpenVPN process,
except where it really is needed.  It's considered needed when
the function fails after 5 attempts, as that most likely
indicates problem with getting enough random data for the filename.

Signed-off-by: David Sommerseth <d...@users.sourceforge.net>
---
 misc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc.c b/misc.c
index 643ffad..bd918ab 100644
--- a/misc.c
+++ b/misc.c
@@ -1190,7 +1190,7 @@ create_temp_file (const char *directory, const char 
*prefix, struct gc_arena *gc
       retfname = gen_path (directory, BSTR (&fname), gc);
       if (!retfname)
         {
-          msg (M_FATAL, "Failed to create temporary filename and path");
+          msg (M_WARN, "Failed to create temporary filename and path");
           return NULL;
         }

@@ -1206,7 +1206,7 @@ create_temp_file (const char *directory, const char 
*prefix, struct gc_arena *gc
         {
           /* Something else went wrong, no need to retry.  */
           struct gc_arena gcerr = gc_new ();
-          msg (M_FATAL, "Could not create temporary file '%s': %s",
+          msg (M_NONFATAL, "Could not create temporary file '%s': %s",
                retfname, strerror_ts (errno, &gcerr));
           gc_free (&gcerr);
           return NULL;
-- 
1.6.6.1


Reply via email to