Fixed error-out when DiffieHellman not supported and respawn requested (part of OS X QA process)
authorDan
Mon, 03 Nov 2008 08:56:44 -0500
changeset 733 e5f638c216f7
parent 718 12485b1d41fd
child 734 904fbf10f112
Fixed error-out when DiffieHellman not supported and respawn requested (part of OS X QA process)
includes/sessions.php
--- a/includes/sessions.php	Sun Nov 02 01:42:17 2008 -0400
+++ b/includes/sessions.php	Mon Nov 03 08:56:44 2008 -0500
@@ -3405,17 +3405,20 @@
     global $db, $session, $paths, $template, $plugins; // Common objects
     
     // Setup EnanoMath and Diffie-Hellman
-    require_once(ENANO_ROOT.'/includes/math.php');
-    
     global $dh_supported;
-    $dh_supported = true;
-    try
+    if ( !function_exists('dh_gen_private') )
     {
-      require_once(ENANO_ROOT . '/includes/diffiehellman.php');
-    }
-    catch ( Exception $e )
-    {
-      $dh_supported = false;
+      require_once(ENANO_ROOT.'/includes/math.php');
+      
+      $dh_supported = true;
+      try
+      {
+        require_once(ENANO_ROOT . '/includes/diffiehellman.php');
+      }
+      catch ( Exception $e )
+      {
+        $dh_supported = false;
+      }
     }
     global $_math;