diff options
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/nabaztaglives/Manifest | 11 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/nabaztaglives-2.00-api.patch | 307 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/nabaztaglives-2.00.patch | 614 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/nabaztaglives-2.01-api.patch | 292 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/postinstall-en-2.00.txt (renamed from www-apps/nabaztaglives/files/postinstall-en-0.6.txt) | 0 | ||||
-rw-r--r-- | www-apps/nabaztaglives/nabaztaglives-2.00.ebuild (renamed from www-apps/nabaztaglives/nabaztaglives-0.6.ebuild) | 8 | ||||
-rw-r--r-- | www-apps/nabaztaglives/nabaztaglives-2.01.ebuild (renamed from www-apps/nabaztaglives/nabaztaglives-0.7.ebuild) | 10 | ||||
-rw-r--r-- | www-apps/nabaztaglives/nabaztaglives-2.03.ebuild | 122 |
8 files changed, 1354 insertions, 10 deletions
diff --git a/www-apps/nabaztaglives/Manifest b/www-apps/nabaztaglives/Manifest index c5ef646e..987b4603 100644 --- a/www-apps/nabaztaglives/Manifest +++ b/www-apps/nabaztaglives/Manifest @@ -1,5 +1,10 @@ -AUX postinstall-en-0.6.txt 300 SHA256 c54ee8192d3aed8a0f90dc5f9805e42e237e1d479ef3bce2679e6d3dff383af5 SHA512 ac3e056e697f6f29a2cb88e0d34aab33c4968c98f08099f71dc80700004883eab6f89dbf7dc168ea18bfcd89b8108b2474af591a40800f6cc5ad20783d713da2 WHIRLPOOL 828a8d8f4aae4ad2fcc9e13148ce73d0f163b35ec5363e090358957fbb1a9da2e53c87164b6aca55bb186905b8407f227804cf37040f764dbbc6aa94da3dca52 +AUX nabaztaglives-2.00-api.patch 9297 SHA256 e685d2b9cdfc75f2ee243ccefa9183defe375202a61b06986dae5cc6c62154f4 SHA512 5405c6a3902afb62a2f3f7ee19674d37187eaf8aecaafdd27373d1e35fe9b3171ac7f84e9fe3bfb3454f2440c80bce77d359134f74db5c6a52e65be6959bf42b WHIRLPOOL 4236b2acd015996da7786a981588732c4f79062384b786f0dc0ebbdbe14ad1ad02cb79a5cfe389b5b732d479a21dab2eab3ed6cb82b1ec8ea1ec00834c3f690b +AUX nabaztaglives-2.00.patch 20490 SHA256 687d25d6dbf30f52ee06c646fbbbe576b36a129c4d5708a9c5b41fc138feaf31 SHA512 22ba32963081fb3ed5dc0ab30eddc0714834d7dd010a920d96d6c33f763491dbcb0c772b4e0c317ca4054990389fbb50cba7d38f513d3ffc17e008c3897f2899 WHIRLPOOL 67360162ba38a4323b9d20327452ab96ea14783529c10f762e226fa9f468fd77e84bee27c337e254924d28b93a862ff5a43157939d14810932a0712ef9d243ac +AUX nabaztaglives-2.01-api.patch 9011 SHA256 a6f677f7819018fb57251b1249874c43654097faf2ba5c4b717e29eb84bce2e9 SHA512 b438464343331201ede935b83b6fb4c6d646195fbcbbfefcbb41f912a6db1c0af2a31e0698160db3a13e33cb0ca85ffc4d154c595369735df83ec22e7257cbdc WHIRLPOOL 033d86f9badd68fb557f0aa2070162878bd7007b5d8df774698cc5adbeab6d3488ed5264de58f0652baafd65ae654d594892efcdea1841f4b4573da52354adf9 +AUX postinstall-en-2.00.txt 300 SHA256 c54ee8192d3aed8a0f90dc5f9805e42e237e1d479ef3bce2679e6d3dff383af5 SHA512 ac3e056e697f6f29a2cb88e0d34aab33c4968c98f08099f71dc80700004883eab6f89dbf7dc168ea18bfcd89b8108b2474af591a40800f6cc5ad20783d713da2 WHIRLPOOL 828a8d8f4aae4ad2fcc9e13148ce73d0f163b35ec5363e090358957fbb1a9da2e53c87164b6aca55bb186905b8407f227804cf37040f764dbbc6aa94da3dca52 DIST nabaztaglives-code-5577e0e24dcf95179d078ddc04753a83b1e43b0a.zip 31649978 SHA256 72ae80194e5522fce4732302d41a580262947fdc55dcc52bcfa2d7f5b6de10a8 SHA512 9b3ba8bb8af32a48529af796fca25a70cb607413a32a877e33a157829dcb5540f8b9e47de4d8725f6bd4ad6af9661503aef8d45661cfe7b675d72999ce269f8b WHIRLPOOL 195c3de2dc7c55ea005bc03f5b66a1d258b69dbccb3911e27c3487128588e998e55d5dadfaac72fd8e0b2911c518aa23a65ffd387000b0c359a5706d12eb15f6 DIST nabaztaglives-code-74cd772d67aaad1accbb58382e16cfaaa5ac6d87.zip 31650624 SHA256 08284563d747154b61036cd4a4172a4b3999ffffa6413b7a4e73628b70c3e07d SHA512 227a3544b3df4394da3d748355756fb4f27bdb140b80840e1b1ffd93da1c2d8d5e57ffaf50d7970a340fc2000377c90f8d207efffcc848319f09792621f66efc WHIRLPOOL e24b423b06b0dc302e596031714a5c210c1783898235664753a8272c8bcd3c8ee209927a7bb690627c56dcb353e4abd9387910573f552de99d607887cbc2c5b0 -EBUILD nabaztaglives-0.6.ebuild 3035 SHA256 c5063073396648258fe71e16605404c323bcaf3e94d911527aedbcc5b657b8d5 SHA512 d1b508ff4294735be6ddd3f577528b3b72bd4f75508f29ff59c0cba351b45c86d32605665ed21b241478c742ad348226ca388892df09830379bc391a7b501861 WHIRLPOOL fca60b61f06a11a8f248b495d3785a303d7448fcfa9e83b5cc2bf07c0cf94e775cb7e964cec2a98ea65f58487bd5e8a7b7cfeb76a3a225579c98aeb7e0919162 -EBUILD nabaztaglives-0.7.ebuild 3033 SHA256 1dad7a92c551a6d4b69bc2ee2b6919861f5676e9586870b6eb3bd36df4542318 SHA512 aed4e46d422a45389b4ee66bd8e9142802bf44a18e2b784bd4e0263878e2b9ccd0d742a85283a40368e69756faedda693bfd13d1b3dee616dd387fcb871ee0b2 WHIRLPOOL 4bec8967bf2ce4bf752f80d4dde0a3e7e6a6c34653ff5a71b9dd354a1362a259164994dce6d715cf08c6ea8590c43f0547b10bc0f4f37de59043d22711d673c5 +DIST nabaztaglives-code-d3a30896c132760bef5f6823efa3b3bb8d0c9f3d.zip 31565931 SHA256 79d3b34adbf2cbb02959fd9d224a99e6d975ec1d60cecd297b9db9e62954fb20 SHA512 951fa50d8efabd0e981b0a03d42d1de9d69d3fc117795fdb8f5d092abbd26c778d21c296fcb2980efeba46894df433a0e711731ab0519fb9a18f4116e3767423 WHIRLPOOL 0f5580c67e925b82e8e2e65e888eb0fede7f293f6eab6004305995fbfbeb9eaa9bb9f22d327c51df0b2afbd26aaf69462fae6f618488b6a692eceec2e9116aa9 +EBUILD nabaztaglives-2.00.ebuild 3149 SHA256 ac9e3803d30d2823ff50ee2667ba68408abe320c8b0f89e877e156783d89ba67 SHA512 98092111317cd4db0b401d5254a0a5f125e367e09cf297f6ec3b64413b35be34cdb40b218bc10a57ca2681521758e0d7a2f31db13be9a1cfc44311c68cf8ec20 WHIRLPOOL 9a5f5f21808493a96c92a3e9484c2e48e0f397ca2bbaac3f1c5499414b664833c9956c2b6349e19bde98ac801eefaf4564508c523916b8249a6cae5aa6cae4d2 +EBUILD nabaztaglives-2.01.ebuild 3148 SHA256 120e1215a875358fbfffca4473176d7fcf90f31070b7a71f018f5f61c0cb489c SHA512 21a0f15b016f4c0b28297b36b01b87175635b1e6bd6e475ab0d489067b9d554e15602441a462e53d3db0209d5ce9caea71d5cc43fcf76c2cd76d60dc94e157ac WHIRLPOOL 6a5f5bd9c562d62ffaa847026c1a3bface2a2255d11debf283172fbe92d5fab72ca54d1438eb281f7d21ee0e8751aa3789909157b6d2f3ffdeb7157d860577ff +EBUILD nabaztaglives-2.03.ebuild 3161 SHA256 e98b76cd10de54ab99b8c473ae1a4b64db70db635b198a18c9f0ec1b7986b292 SHA512 e2cd2f6dfc999eb961392acbe66bffdbd0f57345004c33e00e143a34c7cb7dc9957a3f67d255157c1e2df39d35e64c6d05bcf25eccafa57868075a5b2911b5e8 WHIRLPOOL 4c3a95ed33747af8a37dae7f493c05bccc5caeb9669d4117c21e5e296476dec74b0452630a1037bca05fa40b3d154710bce2123a64826ceefb328f417bd24c2b diff --git a/www-apps/nabaztaglives/files/nabaztaglives-2.00-api.patch b/www-apps/nabaztaglives/files/nabaztaglives-2.00-api.patch new file mode 100644 index 00000000..2ce18a9a --- /dev/null +++ b/www-apps/nabaztaglives/files/nabaztaglives-2.00-api.patch @@ -0,0 +1,307 @@ +--- www/api.php 2014-07-29 02:14:47.000000000 +0100 ++++ www/api.php 2014-07-29 21:30:01.649857515 +0100 +@@ -29,7 +29,9 @@ You should have received a copy of the G + along with NabaztagLives. If not, see <http://www.gnu.org/licenses/>. + */ + //error_reporting(E_ALL); //don't use this in production +-ini_set('display_errors', 0); ++//ini_set('display_errors', 0); ++error_reporting(E_ALL); //don't use this in production ++ini_set('display_errors', 1); + ini_set('log_errors', 1); + ini_set('error_log','logs/error.log'); + //error_reporting(0); //don't use this, use ini_set or nothing goes to the log +@@ -57,7 +59,8 @@ if(isset($_GET['color'])) $color= $_GET[ + if(isset($_GET['play'])) $play=$_GET['play']; //play mp3 + if(isset($_GET['stream'])) $stream=$_GET['stream']; //stream mp3 + +-$debug=false; ++//$debug=false; ++$debug=true; + + if(strlen($sn) == 0) + { +@@ -104,7 +107,7 @@ include 'config/db.php'; + $con = mysqli_connect($host,$user,$pass,$db); + if (!$con) + { +- logError('Api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); ++ logError('api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -124,7 +127,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid log connect call. ' . mysqli_error($con)); ++ logError('api.php: Invalid log connect call. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -132,7 +135,7 @@ if (!$result) + $result = mysqli_query($con,"select @rabbitID"); + if (!$result) + { +- logError('Api.php: Invalid log query. ' . mysqli_error($con)); ++ logError('api.php: Invalid log query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -148,7 +151,8 @@ if($rabbitID < 1) //rows found in DB + return; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************* + * get rabbit +@@ -158,7 +162,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid getRabbit query. ' . mysqli_error($con)); ++ logError('api.php: Invalid getRabbit query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -187,11 +191,12 @@ while($row = mysqli_fetch_row($result)) + + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + ++/* + if(($sn == "00904B8C6C6D") || ($sn == '000000000000')) + { +- /* + $out = './vl/FR/bin2/api.bin'; + $msg = file_get_contents($out); + //echo $msg . '<P>'; +@@ -231,8 +236,8 @@ if(($sn == "00904B8C6C6D") || ($sn == '0 + echo 'OK'; + mysqli_close($con); + exit(0); +- */ + } ++*/ + + $min = date("i"); //minute 00-59 + $sec = date("s"); //secs 00-59 +@@ -252,10 +257,11 @@ $cmd = "delete from queue " + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid delete queue query: ' . mysqli_error($con)); ++ logError('api.php: Invalid delete queue query: ' . mysqli_error($con)); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + //need to check here to make sure there is not already a msg in the queue from multiple attempts + +@@ -283,7 +289,8 @@ if($count > 0) + exit(0); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************************************** + * LED color +@@ -467,25 +474,26 @@ return; + function queueV1($msg,$rabbitID,$min,$con) + { + if(strlen($msg) < 1) return; +- +- mysqli_next_result($con); //required to avoid sync error +- +- $cmd = "call sp_Queue2('" . $rabbitID . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ ++ logError("DEBUG: api.php:queueV1 started with msg '" . $msg . "'"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); ++ ++ $cmd = "call sp_Queue2('" . $rabbitID . "', '" . $min . "', '" . $msg . "', @msg)"; + +- $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); +- ++ $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); ++ + if (!$result) + { +- logError("Api.php: Queue query failed. " . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError("api.php: Queue query failed: " . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -493,10 +501,10 @@ function queueV1($msg,$rabbitID,$min,$co + $msg = $row[0]; + + if($msg != 'OK') +- logError("Api.php: Queue function: $msg"); +- +- mysqli_next_result($con); //required to avoid sync error +- ++ logError("api.php: Queue function: $msg"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /***************************************************************** +@@ -530,11 +538,13 @@ function queueCmd($serNbr,$min,$msg,$con + if (!$result) + { + logError('API.php: Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -548,7 +558,8 @@ function queueCmd($serNbr,$min,$msg,$con + logError($msg); + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + } + +@@ -562,41 +573,41 @@ function queue($serNbr,$min,$tts,$con,$l + echo "You need to enter some text to send to the rabbit. $back"; + return; + } +- ++ ++ logError("DEBUG: api.php:queue started for serial '" . $serNbr . "', text '" . $tts . "'"); ++ + $tts = mysqli_real_escape_string($con, $tts); + + $lang = getLanguage($lang); +- ++ + doTTS($tts,$lang,$serNbr); +- ++ + $hutch = "./hutch/$serNbr"; +- $msg="PLAY $hutch/tts.mp3"; ++ $msg="PLAY $hutch/tts.mp3"; + +- $cmd = "call sp_Queue('" . $serNbr . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ $cmd = "call sp_Queue('" . $serNbr . "', '" . $min . "', '" . $msg . "', @msg)"; + + $result = mysqli_query($con,$cmd); +- ++ + //retry transaction +- if(!$result) ++ if (!$result) + { +- usleep(1000000); //1 sec +- //usleep(100000); //100 ms +- +- $result = mysqli_query($con,$cmd); ++ usleep(1000000); //1 sec ++ //usleep(100000); //100 ms ++ ++ $result = mysqli_query($con,$cmd); + } +- ++ + if (!$result) + { +- logError('API.php Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError('api.php Queue function invalid insert after retry: ' . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -609,9 +620,9 @@ function queue($serNbr,$min,$tts,$con,$l + { + logError($msg); + } +- +- mysqli_next_result($con); //required to avoid sync error + ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /*********************************************************** +@@ -630,11 +641,13 @@ function outV1($out,$rabbitID,$min,$con) + if (!$result) + { + logError('Out function invalid update last Command query: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -644,7 +657,8 @@ function outV1($out,$rabbitID,$min,$con) + if($msg != 'OK') + logError($msg); + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + +@@ -670,4 +684,4 @@ function doTTS($t,$lang,$sn) + } + + ?> +-</html> +\ No newline at end of file ++</html> diff --git a/www-apps/nabaztaglives/files/nabaztaglives-2.00.patch b/www-apps/nabaztaglives/files/nabaztaglives-2.00.patch new file mode 100644 index 00000000..b571176c --- /dev/null +++ b/www-apps/nabaztaglives/files/nabaztaglives-2.00.patch @@ -0,0 +1,614 @@ +--- www/check_rabbit.php 2014-07-29 02:14:49.000000000 +0100 ++++ www/check_rabbit.php 2014-07-29 20:11:24.520466620 +0100 +@@ -96,7 +96,8 @@ while($row = mysqli_fetch_row($result)) + + echo '</table>'; + echo "<P>Local server time is $time </center>"; +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + mysqli_close($con); + + echo '<P>'; +--- www/index.php 2014-07-29 02:14:57.000000000 +0100 ++++ www/index.php 2014-07-29 20:11:39.697184950 +0100 +@@ -86,7 +86,8 @@ include './subroutines/logError.php'; + + echo "<h2>$count</h2>"; + +- mysqli_next_result($con); ++ //mysqli_next_result($con); ++ while(mysqli_next_result($con)); + ?> + </div> + <div id="spacer"></div> +@@ -108,7 +109,8 @@ include './subroutines/logError.php'; + + if(isset($latest)) echo $latest . '!'; + +- mysqli_next_result($con); ++ //mysqli_next_result($con); ++ while(mysqli_next_result($con)); + ?> + + </div> +@@ -146,7 +148,11 @@ include './subroutines/logError.php'; + $data = fread($fh,filesize($file)); + fclose($fh); + +- $IP = $_SERVER['SERVER_ADDR']; ++ #$IP = $_SERVER['SERVER_ADDR']; ++ if(strlen($_SERVER['SERVER_ADDR']) < 10) ++ $IP = gethostbyname(php_uname('n')); ++ else ++ $IP = $_SERVER['SERVER_ADDR']; + + if(strlen($IP) < 8) + { +@@ -156,16 +162,15 @@ include './subroutines/logError.php'; + + if(stristr($data,"ping $IP") == FALSE) + { +- echo 'Warning - locator records are invalid.'; ++ echo "Warning - locator records are invalid (expected 'ping $IP')."; + return; + } + + if(stristr($data,"broad $IP") == FALSE) + { +- echo 'Warning - locator records are invalid.'; ++ echo "Warning - locator records are invalid (expected 'broad $IP')."; + return; + } + + ?> +- +-</html> +\ No newline at end of file ++</html> +--- www/newRabbit.php 2014-07-29 02:15:00.000000000 +0100 ++++ www/newRabbit.php 2014-07-29 01:51:04.514381105 +0100 +@@ -64,7 +64,8 @@ if (!$result) + return; + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + $cmd = 'call sp_GetLanguage();'; + +--- www/peek.php 2014-07-29 02:15:01.000000000 +0100 ++++ www/peek.php 2014-07-29 20:12:28.057349572 +0100 +@@ -67,7 +67,8 @@ while($row = mysqli_fetch_row($result)) + $serNbr = $row[0]; + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + + $result = mysqli_query($con,"call sp_GetRabbit('$serNbr')"); + if (!$result) die('Invalid getRabbit query: ' . mysqli_error($con)); +@@ -104,7 +105,8 @@ if($debug==true) + echo "language = $language<br>"; + echo "timezone = $time<br>"; + } +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + + $result = mysqli_query($con,'SELECT name from timeZone order by name'); + if (!$result) die('Invalid timezone query: ' . mysqli_error($con)); +@@ -350,7 +352,8 @@ Still have a question? <a href="images/s + /****************************************** + * Get RSS + ******************************************/ +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + + $result = mysqli_query($con,"call sp_GetRSS($rabbitID)"); + if (!$result) die('Call to RSS proc failed. ' . mysqli_error($con)); +@@ -367,7 +370,8 @@ while($row = mysqli_fetch_row($result)) + $rss_url[] = $row[1]; + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + + if($reboot == 1) + $reboot='checked'; +@@ -410,7 +414,9 @@ If your rabbit has sniffed tags, they wi + <?php + $schedCount = 11; + $result = mysqli_query($con,"call sp_GetRFID($rabbitID)"); +-if (!$result) die('Call to RFID proc failed. ' . mysqli_error($con)); ++//if (!$result) die('Call to RFID proc failed. ' . mysqli_error($con)); ++if (!$result) ++ echo '<tr><td colspan="3">Call to RFID proc failed: ' . mysqli_error($con) . '</td></tr>'; + mysqli_use_result($con); + + $i=0; +@@ -431,7 +437,8 @@ while($row = mysqli_fetch_row($result)) + + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + mysqli_close($con); + + +--- www/rabbits.php 2014-07-29 02:15:01.000000000 +0100 ++++ www/rabbits.php 2014-07-29 20:12:45.890743612 +0100 +@@ -90,7 +90,8 @@ while($row = mysqli_fetch_row($result)) + } + echo '</table>'; + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + + $cmd = 'call sp_GetStats();'; + +@@ -108,7 +109,8 @@ echo "<br>MySQL uptime hours = " . round + echo "<br>Your IP is $ip"; + echo "<br>Peak PHP memory usage is " . number_format(memory_get_peak_usage(TRUE)) . " bytes"; + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + mysqli_close($con); + + echo " <P> <P>"; +@@ -136,4 +138,4 @@ $_SESSION['rabbitCount'] = $i; + ?> + + <a href="index.php">Home</a> +-</html> +\ No newline at end of file ++</html> +--- www/saveUpdateRabbit.php 2014-07-29 02:15:03.000000000 +0100 ++++ www/saveUpdateRabbit.php 2014-07-29 01:51:48.071196057 +0100 +@@ -241,7 +241,8 @@ if (isset($_POST['btnRestart'])) + while($row = mysqli_fetch_row($result)) + $msg = $row[0]; + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + if($msg != 'OK') + logError("saveUpdateRabbit purge queue failed with $msg"); +@@ -337,7 +338,8 @@ if (!$result) + return; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + if($debug == true) + { +@@ -417,11 +419,13 @@ function queue($serNbr,$min,$msg,$con,$l + if (!$result) + { + logError('Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -435,7 +439,8 @@ function queue($serNbr,$min,$msg,$con,$l + logError($msg); + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + echo "The message has been sent. It may take a minute to reach your rabbit. Click your browser's back button to go back."; + } +@@ -489,4 +494,4 @@ function doRSSFeed($url,$sn,$lang) + + + ?> +-</html> +\ No newline at end of file ++</html> +--- www/stream.php 2014-07-29 02:15:09.000000000 +0100 ++++ www/stream.php 2014-07-29 20:12:54.530773024 +0100 +@@ -104,7 +104,8 @@ if(intval($rabbitID) < 1) + return; + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + mysqli_close($con); + + ?> +--- www/stream_post.php 2014-07-29 02:15:10.000000000 +0100 ++++ www/stream_post.php 2014-07-29 20:13:10.627494485 +0100 +@@ -113,7 +113,8 @@ if(intval($rabbitID) < 1) + return; + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while(mysqli_next_result($con)); + mysqli_close($con); + + //date_default_timezone_set('America/Chicago'); //for warning +@@ -158,13 +159,15 @@ function queue($cmd,$rabbitID,$min) + if (!$result) + { + logError('Queue function invalid insert Command query: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + mysqli_close($con); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + mysqli_close($con); + } + +-?> +\ No newline at end of file ++?> +--- www/subroutines/queryWithRetry.php 2014-07-29 02:15:12.000000000 +0100 ++++ www/subroutines/queryWithRetry.php 2014-07-29 01:52:22.784647569 +0100 +@@ -14,7 +14,8 @@ function queryWithRetry($con,$cmd,$rabbi + $max = 3; + $time1 = date("H:i:s"); + +- if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ //if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,$cmd); + +@@ -62,4 +63,4 @@ function queryWithRetry($con,$cmd,$rabbi + return $result; + } + +-?> +\ No newline at end of file ++?> +--- www/updateRabbit2.php 2014-07-29 02:15:18.000000000 +0100 ++++ www/updateRabbit2.php 2014-07-29 21:29:06.049668247 +0100 +@@ -41,7 +41,9 @@ $serialNbr = $_SESSION['rawSerialNbr']; + <P> + <?php + //error_reporting(E_ALL); //don't use this in production +-ini_set('display_errors', 0); ++//ini_set('display_errors', 0); ++error_reporting(E_ALL); //don't use this in production ++ini_set('display_errors', 1); + ini_set('log_errors', 1); + ini_set('error_log','logs/error.log'); + //error_reporting(0); //don't use this, use ini_set or nothing goes to the log +@@ -49,7 +51,8 @@ ini_set('error_log','logs/error.log'); + include './subroutines/logError.php'; + include 'config/db.php'; + +-$debug=false; ++//$debug=false; ++$debug=true; + + $con = mysqli_connect($host,$user,$pass,$db); + if (!$con) die('Could not connect: ' . mysqli_error()); +@@ -131,7 +134,8 @@ if(intval($rabbitID) < 1) + + if(is_null($weekendWakeHour)) $weekendWakeHour = $wakeHour; + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while (mysqli_more_results($con)) { mysqli_next_result($con); } + + $cmd = 'call sp_GetTimeZone();'; + +@@ -141,7 +145,8 @@ if (!$result) + logError('updateRabbit2.php: Invalid timezone query: ' . mysqli_error($con)); + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while (mysqli_more_results($con)) { mysqli_next_result($con); } + + $cmd = 'call sp_GetLanguage();'; + $resultLang = mysqli_query($con, $cmd); +@@ -151,7 +156,8 @@ if (!$resultLang) + logError('updateRabbit2.php: Invalid query: ' . mysqli_error($con)); + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while (mysqli_more_results($con)) { mysqli_next_result($con); } + + if($reboot == 1) + $reboot='checked'; +@@ -403,7 +409,8 @@ Still have a question? <a href="images/s + /****************************************** + * Get RSS + ******************************************/ +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while (mysqli_more_results($con)) { mysqli_next_result($con); } + + $result = mysqli_query($con,"call sp_GetRSS($rabbitID)"); + if (!$result) die('Call to RSS proc failed. ' . mysqli_error($con)); +@@ -420,7 +427,8 @@ while($row = mysqli_fetch_row($result)) + $rss_url[] = $row[1]; + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while (mysqli_more_results($con)) { mysqli_next_result($con); } + + ?> + <fieldset><legend><b>RSS Feed (V2 only)</b></legend> +@@ -478,8 +486,9 @@ $result = mysqli_query($con,"call sp_Get + if (!$result) + { + logError('Call to RFID proc failed. ' . mysqli_error($con)); +- return; +-} ++ echo '<tr><td colspan="3">Call to RFID proc failed: ' . mysqli_error($con) . '</td></tr>'; ++ //return; ++} else { + + mysqli_use_result($con); + +@@ -501,7 +510,10 @@ while($row = mysqli_fetch_row($result)) + + } + +-mysqli_next_result($con); ++//mysqli_next_result($con); ++while (mysqli_more_results($con)) { mysqli_next_result($con); } ++ ++} + + ?> + </table> +--- www/updateSchedule.php 2014-07-29 02:15:20.000000000 +0100 ++++ www/updateSchedule.php 2014-07-29 01:53:00.108107967 +0100 +@@ -102,7 +102,8 @@ for($i=1;$i < 11; $i++) + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + } +-?> +\ No newline at end of file ++?> +--- www/vl/FR/p3.jsp 2014-07-29 02:19:52.000000000 +0100 ++++ www/vl/FR/p3.jsp 2014-07-29 01:55:43.478664149 +0100 +@@ -118,7 +118,8 @@ if($rabbitID < 1) //rows found in DB + return; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************* + * get rabbit +@@ -190,7 +191,8 @@ switch($language) + break; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /******************************************************** + * set the version of the rabbit V1 if not set already +@@ -202,7 +204,8 @@ $result = mysqli_query($con,$cmd); + if (!$result) + logError('Invalid update rabbit version query: ' . mysqli_error($con)); + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + //delete cmd if older than 3 mins + +@@ -213,7 +216,8 @@ $result = mysqli_query($con,$cmd); + if (!$result) + logError('Invalid delete queue query: ' . mysqli_error($con)); + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + date_default_timezone_set("$timeZone"); //sets to local time zone e.g london + $hour = date("H",time()); +@@ -321,7 +325,8 @@ while($row = mysqli_fetch_row($result)) + } + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + //get next from queue + //note you may need to send the minute to the proc if you get duplicate messages +@@ -344,7 +349,8 @@ while($row = mysqli_fetch_row($result)) + $msg = $row[1]; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + if(strlen($msg) > 0) + { +@@ -599,7 +605,8 @@ function testLoop($rabbitID, $min,$con) + out($dir . $file,$rabbitID,$min,$con); + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /*********************************************************** +@@ -611,7 +618,8 @@ function queue($msg,$rabbitID,$min,$con) + + //echo "msg=$msg<br>rabbitID=$rabbitID<br>min=$min<br>"; + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $cmd = "call sp_Queue2('" . $rabbitID . "' + ,'" . $min . "' +@@ -625,11 +633,13 @@ function queue($msg,$rabbitID,$min,$con) + if (!$result) + { + logError("Queue query failed. " . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -639,7 +649,8 @@ function queue($msg,$rabbitID,$min,$con) + if($msg != 'OK') + logError("Queue function: $msg"); + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + //mysqli_close($con); + } + +@@ -667,11 +678,13 @@ function setLastCmd($con, $out, $rabbitI + if (!$result) + { + logError('setLastCmd: invalid update last Command query: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -681,7 +694,8 @@ function setLastCmd($con, $out, $rabbitI + if($msg != 'OK') + logError($msg); + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + } + +@@ -824,4 +838,4 @@ function logError($msg) + } + + +-?> +\ No newline at end of file ++?> +--- www/vl/p4.php 2014-07-29 02:15:40.000000000 +0100 ++++ www/vl/p4.php 2014-07-29 20:14:13.011040178 +0100 +@@ -245,7 +245,8 @@ if($sn == '000000000000') //for testing + //return; + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + /******************************************************** + * set the version of the rabbit V2 if not set already +@@ -262,7 +263,8 @@ if($version == 0) //default DB value is + return; + } + +- if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ //if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ while(mysqli_next_result($con)); + } + + /******************************************************** +@@ -278,7 +280,8 @@ if (!$result) + return; + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + date_default_timezone_set("$timeZone"); //sets to local time zone of rabbit e.g london + $hour = date("H",time()); +@@ -451,7 +454,8 @@ if(($min == '10') || ($min == '20') || ( + $i=$i+1; + } + +- if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ //if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++ while(mysqli_next_result($con)); + + } + +@@ -480,7 +484,8 @@ while($row = mysqli_fetch_row($result)) + $rss[] = $row[1]; + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + /************************************************* + * Check for RFID scan +@@ -544,7 +549,8 @@ while($row = mysqli_fetch_row($result)) + + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + //get next from queue + +@@ -566,7 +572,8 @@ while($row = mysqli_fetch_row($result)) + $msg = $row[1]; + } + +-if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++//if(mysqli_more_results($con)) mysqli_next_result($con); //Commands out of sync; you can't run this command now error. ++while(mysqli_next_result($con)); + + if(strlen($msg) > 0) + { diff --git a/www-apps/nabaztaglives/files/nabaztaglives-2.01-api.patch b/www-apps/nabaztaglives/files/nabaztaglives-2.01-api.patch new file mode 100644 index 00000000..8230f6b7 --- /dev/null +++ b/www-apps/nabaztaglives/files/nabaztaglives-2.01-api.patch @@ -0,0 +1,292 @@ +--- www/api.php.dist 2015-05-03 16:51:41.252860991 +0100 ++++ www/api.php 2015-05-03 16:55:27.236896977 +0100 +@@ -29,7 +29,9 @@ You should have received a copy of the G + along with NabaztagLives. If not, see <http://www.gnu.org/licenses/>. + */ + //error_reporting(E_ALL); //don't use this in production +-ini_set('display_errors', 0); ++//ini_set('display_errors', 0); ++error_reporting(E_ALL); //don't use this in production ++ini_set('display_errors', 1); + ini_set('log_errors', 1); + ini_set('error_log','logs/error.log'); + //error_reporting(0); //don't use this, use ini_set or nothing goes to the log +@@ -59,7 +61,8 @@ if(isset($_GET['stream'])) $stream=$_GET + if(isset($_GET['earleft'])) $earleft= $_GET['earleft']; + if(isset($_GET['earright'])) $earright= $_GET['earright']; + +-$debug=false; ++//$debug=false; ++$debug=true; + + if(strlen($sn) == 0) + { +@@ -106,7 +109,7 @@ include 'config/db.php'; + $con = mysqli_connect($host,$user,$pass,$db); + if (!$con) + { +- logError('Api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); ++ logError('api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -126,7 +129,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid log connect call. ' . mysqli_error($con)); ++ logError('api.php: Invalid log connect call. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -134,7 +137,7 @@ if (!$result) + $result = mysqli_query($con,"select @rabbitID"); + if (!$result) + { +- logError('Api.php: Invalid log query. ' . mysqli_error($con)); ++ logError('api.php: Invalid log query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -150,7 +153,8 @@ if($rabbitID < 1) //rows found in DB + return; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************* + * get rabbit +@@ -160,7 +164,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid getRabbit query. ' . mysqli_error($con)); ++ logError('api.php: Invalid getRabbit query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -189,7 +193,8 @@ while($row = mysqli_fetch_row($result)) + + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + $min = date("i"); //minute 00-59 + $sec = date("s"); //secs 00-59 +@@ -209,10 +214,11 @@ $cmd = "delete from queue " + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid delete queue query: ' . mysqli_error($con)); ++ logError('api.php: Invalid delete queue query: ' . mysqli_error($con)); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + //need to check here to make sure there is not already a msg in the queue from multiple attempts + +@@ -240,7 +246,8 @@ if($count > 0) + exit(0); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************************************** + * LED color +@@ -471,25 +478,26 @@ return; + function queueV1($msg,$rabbitID,$min,$con) + { + if(strlen($msg) < 1) return; +- +- mysqli_next_result($con); //required to avoid sync error +- +- $cmd = "call sp_Queue2('" . $rabbitID . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ ++ logError("DEBUG: api.php:queueV1 started with msg '" . $msg . "'"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); ++ ++ $cmd = "call sp_Queue2('" . $rabbitID . "', '" . $min . "', '" . $msg . "', @msg)"; + +- $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); +- ++ $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); ++ + if (!$result) + { +- logError("Api.php: Queue query failed. " . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError("api.php: Queue query failed: " . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -497,10 +505,10 @@ function queueV1($msg,$rabbitID,$min,$co + $msg = $row[0]; + + if($msg != 'OK') +- logError("Api.php: Queue function: $msg"); +- +- mysqli_next_result($con); //required to avoid sync error +- ++ logError("api.php: Queue function: $msg"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /***************************************************************** +@@ -534,11 +542,13 @@ function queueCmd($serNbr,$min,$msg,$con + if (!$result) + { + logError('API.php: Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -552,7 +562,8 @@ function queueCmd($serNbr,$min,$msg,$con + logError($msg); + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + } + +@@ -566,41 +577,41 @@ function queue($serNbr,$min,$tts,$con,$l + echo "You need to enter some text to send to the rabbit. $back"; + return; + } +- ++ ++ logError("DEBUG: api.php:queue started for serial '" . $serNbr . "', text '" . $tts . "'"); ++ + $tts = mysqli_real_escape_string($con, $tts); + + $lang = getLanguage($lang); +- ++ + doTTS($tts,$lang,$serNbr); +- ++ + $hutch = "./hutch/$serNbr"; +- $msg="PLAY $hutch/tts.mp3"; ++ $msg="PLAY $hutch/tts.mp3"; + +- $cmd = "call sp_Queue('" . $serNbr . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ $cmd = "call sp_Queue('" . $serNbr . "', '" . $min . "', '" . $msg . "', @msg)"; + + $result = mysqli_query($con,$cmd); +- ++ + //retry transaction +- if(!$result) ++ if (!$result) + { +- usleep(1000000); //1 sec +- //usleep(100000); //100 ms +- +- $result = mysqli_query($con,$cmd); ++ usleep(1000000); //1 sec ++ //usleep(100000); //100 ms ++ ++ $result = mysqli_query($con,$cmd); + } +- ++ + if (!$result) + { +- logError('API.php Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError('api.php Queue function invalid insert after retry: ' . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -613,9 +624,9 @@ function queue($serNbr,$min,$tts,$con,$l + { + logError($msg); + } +- +- mysqli_next_result($con); //required to avoid sync error + ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /*********************************************************** +@@ -634,11 +645,13 @@ function outV1($out,$rabbitID,$min,$con) + if (!$result) + { + logError('Out function invalid update last Command query: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -648,7 +661,8 @@ function outV1($out,$rabbitID,$min,$con) + if($msg != 'OK') + logError($msg); + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + +@@ -674,4 +688,4 @@ function doTTS($t,$lang,$sn) + } + + ?> +-</html> +\ No newline at end of file ++</html> diff --git a/www-apps/nabaztaglives/files/postinstall-en-0.6.txt b/www-apps/nabaztaglives/files/postinstall-en-2.00.txt index 1d0db43e..1d0db43e 100644 --- a/www-apps/nabaztaglives/files/postinstall-en-0.6.txt +++ b/www-apps/nabaztaglives/files/postinstall-en-2.00.txt diff --git a/www-apps/nabaztaglives/nabaztaglives-0.6.ebuild b/www-apps/nabaztaglives/nabaztaglives-2.00.ebuild index 4a88f3ac..9c428168 100644 --- a/www-apps/nabaztaglives/nabaztaglives-0.6.ebuild +++ b/www-apps/nabaztaglives/nabaztaglives-2.00.ebuild @@ -1,6 +1,5 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ EAPI=5 @@ -88,6 +87,9 @@ src_prepare() { mv www/*.jpg www/images/ mv db/rabbit_pi.sql db/initial.sql + + epatch "${FILESDIR}/${P}-api.patch" || die "Patch failed" + epatch "${FILESDIR}/${P}-mysql-debug.patch" || die "Patch failed" } src_install() { @@ -95,7 +97,7 @@ src_install() { use doc && dohtml -r docs/* - einfo "Installation of large numbers of files can be slow - please wait ..." + ewarn "Installation of large numbers of files can be slow - please wait ..." insinto "${MY_HTDOCSDIR}" doins -r www/* dodir "${MY_HTDOCSDIR}"/db diff --git a/www-apps/nabaztaglives/nabaztaglives-0.7.ebuild b/www-apps/nabaztaglives/nabaztaglives-2.01.ebuild index 5b3d1158..c3fcaecf 100644 --- a/www-apps/nabaztaglives/nabaztaglives-0.7.ebuild +++ b/www-apps/nabaztaglives/nabaztaglives-2.01.ebuild @@ -1,6 +1,5 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ EAPI=5 @@ -88,6 +87,9 @@ src_prepare() { mv www/*.jpg www/images/ mv db/rabbit_pi.sql db/initial.sql + + epatch "${FILESDIR}/${PN}-2.01-api.patch" || die "Patch failed" + epatch "${FILESDIR}/${PN}-2.00.patch" || die "Patch failed" } src_install() { @@ -95,7 +97,7 @@ src_install() { use doc && dohtml -r docs/* - einfo "Installation of large numbers of files can be slow - please wait ..." + ewarn "Installation of large numbers of files can be slow - please wait ..." insinto "${MY_HTDOCSDIR}" doins -r www/* dodir "${MY_HTDOCSDIR}"/db @@ -113,7 +115,7 @@ src_install() { webapp_configfile "${MY_HTDOCSDIR}"/config/db.php webapp_configfile "${MY_HTDOCSDIR}"/locate.jsp - webapp_postinst_txt en "${FILESDIR}"/postinstall-en-0.6.txt + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.00.txt webapp_src_install } diff --git a/www-apps/nabaztaglives/nabaztaglives-2.03.ebuild b/www-apps/nabaztaglives/nabaztaglives-2.03.ebuild new file mode 100644 index 00000000..d2d69ab3 --- /dev/null +++ b/www-apps/nabaztaglives/nabaztaglives-2.03.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils webapp + +LANGUAGES="linguas_de linguas_en linguas_es linguas_fr linguas_it linguas_us" + +COMMIT="d3a30896c132760bef5f6823efa3b3bb8d0c9f3d" + +DESCRIPTION="Nabaztag/tag NabaztagLives! Server" +HOMEPAGE="http://nabaztaglives.com" +SRC_URI="http://sourceforge.net/code-snapshots/git/n/na/nabaztaglives/code.git/nabaztaglives-code-${COMMIT}.zip" +RESTRICT="nomirror" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="doc ${LANGUAGES}" + +RDEPEND=" + virtual/httpd-php + dev-lang/php + media-sound/lame + media-sound/mp3wrap +" + +need_httpd_cgi + +S="${WORKDIR}/nabaztaglives-code-${COMMIT}" + +src_prepare() { + cd "${S}" + + sed -si \ + -e 's|<? |<?php |g' \ + www/*.php \ + || die "PHP patching failed: ${?}" + + sed -si \ + -e "s|'../etc/nabaztag_error.log'|'logs/error.log'|" \ + www/*.php www/subroutines/logError.php \ + || die "Log-location patching failed: ${?}" + sed -si \ + -e 's|../etc/nabaztag_error.log|logs/error.log|' \ + www/vl/p4.php www/vl/FR/p3.jsp \ + || die "Log-location patching failed: ${?}" + + sed -si \ + -e "s|../etc/api_calls.log|logs/apicalls.log|" \ + www/*.php \ + || die "API log-location patching failed: ${?}" + + sed -si \ + -e 's|../etc/nabaztag_db.php|config/db.php|' \ + www/*.php www/subroutines/*.php www/vl/p4.php www/vl/FR/p3.jsp \ + || die "Configuration patching failed: ${?}" + + sed -rsi \ + -e 's|<img src="?([^"> ]+).jpg"?|<img src="images/\1.jpg"|g' \ + www/*.php www/*.htm \ + || die "Image patching failed: ${?}" + sed -rsi \ + -e 's|<a href="?([^"> ]+).jpg"?|<a href="images/\1.jpg"|g' \ + www/*.php \ + || die "Image patching failed: ${?}" + + sed -rsi \ + -e 's|url\(([^)]+).jpg\)|url(images/\1.jpg)|g' \ + www/main.css \ + || die "CSS Image patching failed: ${?}" + + sed -si \ + -e "/'pi'/d" \ + db/rabbit_pi.sql \ + || die "MySQL script patching failed: ${?}" + + #use linguas_en || { einfo "Removing audio files for EN/US language" ; rm -r www/vl/broad_us ; } + for LNG in it es de us; do + eval "use linguas_${LNG} || { einfo 'Removing audio files for ${LNG} language' ; rm -r www/vl/broad_${LNG} ; }" + done + + mkdir www/images + + rm db/*.sh + rm docs/installation.htm + + mv www/*.jpg www/images/ + mv db/rabbit_pi.sql db/initial.sql + + epatch "${FILESDIR}/${PN}-2.01-api.patch" || die "Patch failed" + epatch "${FILESDIR}/${PN}-2.00.patch" || die "Patch failed" +} + +src_install() { + webapp_src_preinst + + use doc && dohtml -r docs/* + + ewarn "Installation of large numbers of files can be slow - please wait ..." + insinto "${MY_HTDOCSDIR}" + doins -r www/* + dodir "${MY_HTDOCSDIR}"/db + dodir "${MY_HTDOCSDIR}"/config + dodir "${MY_HTDOCSDIR}"/logs + insinto "${MY_HTDOCSDIR}"/db + doins -r db/* + insinto "${MY_HTDOCSDIR}"/config + newins etc/nabaztag_db.php db.php + insinto "${MY_HTDOCSDIR}"/logs + newins etc/nabaztag_error.log error.log + + webapp_serverowned "${MY_HTDOCSDIR}"/vl/hutch + webapp_serverowned "${MY_HTDOCSDIR}"/logs/error.log + webapp_configfile "${MY_HTDOCSDIR}"/config/db.php + webapp_configfile "${MY_HTDOCSDIR}"/locate.jsp + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.00.txt + + webapp_src_install +} |