From c96f928056ac6c7fdaadaaa9b51bb66525f0657c Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Wed, 27 Aug 2014 11:20:54 +0200 Subject: [PATCH] fixing alternc_shutdown bug --- bureau/admin/bro_tgzdown.php | 4 +--- bureau/class/config.php | 17 ----------------- bureau/class/m_bro.php | 3 --- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/bureau/admin/bro_tgzdown.php b/bureau/admin/bro_tgzdown.php index 7f1a4ee8..644472db 100644 --- a/bureau/admin/bro_tgzdown.php +++ b/bureau/admin/bro_tgzdown.php @@ -36,9 +36,7 @@ getFields($fields); $p=$bro->GetPrefs(); -// need to release the giant lock, otherwise those downloads will hang -// AlternC for all users! -alternc_shutdown(); + switch ($p["downfmt"]) { case 0: $bro->DownloadTGZ($dir); diff --git a/bureau/class/config.php b/bureau/class/config.php index 0bc75529..c52e4adb 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -52,23 +52,6 @@ Merci de revenir plus tard."; } /* */ -/* Toutes les pages du bureau passent ici. On utilise une s�maphore pour - s'assurer que personne ne pourra acc�der � 2 pages du bureau en m�me temps. -*/ -/* * / -// 1. Get a semaphore id for the alternc magic number (18577) -$alternc_sem = sem_get ( 18577 ); -// 2. Declare the shutdown function, that release the semaphore -function alternc_shutdown() { - global $alternc_sem; - @sem_release( $alternc_sem ); -} -// 3. Register the shutdown function -register_shutdown_function("alternc_shutdown"); -// 4. Acquire the semaphore : with that process, -sem_acquire( $alternc_sem ); -/* */ - if (ini_get("safe_mode")) { echo "SAFE MODE IS ENABLED for the web panel ! It's a bug in your php or apache configuration, please fix it !!"; exit(); diff --git a/bureau/class/m_bro.php b/bureau/class/m_bro.php index 5064f738..57820ca6 100644 --- a/bureau/class/m_bro.php +++ b/bureau/class/m_bro.php @@ -1165,9 +1165,6 @@ class m_bro { } $timestamp=date("H:i:s"); - // relacher le lock global sinon ce download va geler alternc pour - // tout le monde - alternc_shutdown(); if(exec("/bin/tar cvf - ".getuserpath()."/ | gzip -9c > ".$dir."/".$mem->user['login']."_html_".$timestamp.".tar.gz")){ $err->log("bro","export_data_succes"); }else{