summaryrefslogtreecommitdiffstats
path: root/Website/mutexTry.php
diff options
context:
space:
mode:
authorTriatmoko2011-11-15 01:37:35 +0100
committerTriatmoko2011-11-15 01:37:35 +0100
commit2b850a5d8d9c3d0a76e05542636657647351d4b1 (patch)
treec94c3b6ad0eccb119254032fe7cd2471ef69ebe4 /Website/mutexTry.php
parentMerge branch 'master' of lab.ks.uni-freiburg.de:lsfks/projekte/gsm-selftest (diff)
downloadgsm-selftest-2b850a5d8d9c3d0a76e05542636657647351d4b1.tar.gz
gsm-selftest-2b850a5d8d9c3d0a76e05542636657647351d4b1.tar.xz
gsm-selftest-2b850a5d8d9c3d0a76e05542636657647351d4b1.zip
Cleaning the unused commenting from the first auhtor!
Diffstat (limited to 'Website/mutexTry.php')
-rwxr-xr-xWebsite/mutexTry.php26
1 files changed, 9 insertions, 17 deletions
diff --git a/Website/mutexTry.php b/Website/mutexTry.php
index e9dc366..5579437 100755
--- a/Website/mutexTry.php
+++ b/Website/mutexTry.php
@@ -36,12 +36,9 @@ if ($locking == '1') //1 means nobody is on the website
{
include 'post.php'; // read posted data and add them to the database
-// echo 'WE had errors: '. $errorAdding;
- //stuff to do here
//check if the software is running!
$softwareLock = 'SoftwareStarted';
-
- //$taskAmount= 1
+
if($taskAmount != 0)
{
$softwareRunning = isLocked($softwareLock);
@@ -60,8 +57,7 @@ if ($locking == '1') //1 means nobody is on the website
fclose($startApp);
}
- //exec("/usr/bin/python /var/www/tricode/gsmselftest2.py > /dev/null 2>&1 &"); //start the software in background and don't wait for any output
- sleep(6); //sleep half second till the software starts
+ sleep(6); //sleep till the software starts
//the software should be running already and set the lock, now we test it and then connect to it!
$softwareRunning1 = isLocked($softwareLock);
@@ -81,7 +77,6 @@ if ($locking == '1') //1 means nobody is on the website
fwrite($fp, "START TEST");
- //fwrite($fp, "SMART TEST"); //send command to start the tests
if(!feof($fp))
{
while(!feof($fp))
@@ -162,7 +157,6 @@ if ($locking == '1') //1 means nobody is on the website
$callFrom = strtoupper($dataForTable[1]);
$callTo = strtoupper($dataForTable[2]);
$testStatus = strtoupper($dataForTable[3]);
- //ADD HERE THE TEST CASES BUT MAKE IT INSIDE OF A FILE (e.q. include 'testing.php'); HERE I PUT IT ONLY FOR EXAMPLE PURPOSES!
if($callFrom == 'SIP' || $callTo == 'SIP')
{
@@ -265,7 +259,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '998' || $testStatus == '802')
{
- $GSMRZ1 = 0; //where is nanoBTS1
+ $GSMRZ1 = 0;
}
}
elseif ($callTo == 'GSMRZ1')
@@ -279,7 +273,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '999' || $testStatus == '801')
{
- $GSMRZ1 = 0; //where is nanoBTS1
+ $GSMRZ1 = 0;
}
}
}
@@ -327,7 +321,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '998' || $testStatus == '802')
{
- $GSMRZ2 = 0; //where is nanoBTS1
+ $GSMRZ2 = 0;
$NANOBTS1P= 1;
}
}
@@ -358,7 +352,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '999' || $testStatus == '801')
{
- $GSMRZ2 = 0; //where is nanoBTS1
+ $GSMRZ2 = 0;
if ($NANOBTS1P != 1)
{
$NANOBTS1P= 2;
@@ -413,7 +407,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '998' || $testStatus == '802')
{
- $GSMRZ3 = 0; //where is nanoBTS1
+ $GSMRZ3 = 0;
$NANOBTS2P= 1;
}
}
@@ -444,7 +438,7 @@ if ($locking == '1') //1 means nobody is on the website
}
elseif($testStatus == '999' || $testStatus == '801')
{
- $GSMRZ3 = 0; //where is nanoBTS1
+ $GSMRZ3 = 0;
if ($NANOBTS1P != 1)
{
$NANOBTS2P= 2;
@@ -909,7 +903,7 @@ if ($locking == '1') //1 means nobody is on the website
<td> ' . $dataForTable[4] . ' </td>
<td>' . $dataForTable[3] . '</td>
</tr>';
- //echo $received . '<br>';
+
echo str_repeat("\n",7024);
flush();
usleep(100);
@@ -941,8 +935,6 @@ if ($locking == '1') //1 means nobody is on the website
echo 'We have an unknown error! Refresh te web page!';
}
- //$release = ReleaseLock($nameOfLock);
- //echo $release . "<br>";
}
else
{