summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/istream.sh6
-rw-r--r--bin/streaminfo.php6
2 files changed, 10 insertions, 2 deletions
diff --git a/bin/istream.sh b/bin/istream.sh
index 09503d3..1e843e0 100755
--- a/bin/istream.sh
+++ b/bin/istream.sh
@@ -31,6 +31,12 @@ fi
# sending it to the segmenter via a PIPE
##############################################################
+# Check that the session dir exists
+if [ ! -e ../ram/$SESSION ]
+then
+ exit;
+fi
+
cd ../ram/$SESSION
# Create a fifo
diff --git a/bin/streaminfo.php b/bin/streaminfo.php
index 8b935ef..130d0f9 100644
--- a/bin/streaminfo.php
+++ b/bin/streaminfo.php
@@ -15,7 +15,9 @@ function writeinfostream($session, $type, $mode, $url, $channame)
$ram = "../ram/" .$session ."/";
- $infofile = fopen($ram ."streaminfo", 'w');
+ $infofile = @fopen($ram ."streaminfo", 'w');
+ if (!$infofile)
+ return;
fwrite($infofile, "type=" .$type ."\n");
fwrite($infofile, "mode=" .$mode ."\n");
@@ -33,7 +35,7 @@ function readinfostream($session)
if (!file_exists($ram ."streaminfo"))
return array("none");
- $infofile = fopen($ram ."streaminfo", 'r');
+ $infofile = @fopen($ram ."streaminfo", 'r');
if (!$infofile)
return array("none");