summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-17 14:46:10 +0100
committerTheTroll <trolldev@gmail.com>2010-03-17 14:46:10 +0100
commit281c41400b062da65dad78209cf9c858d46c4c0c (patch)
treeaf7330d7e7dbc064696158c9539b321eb576e805
parent0bcf34ea3d7819c7d63a14bfb4def500b3a16e86 (diff)
downloadistreamdev-281c41400b062da65dad78209cf9c858d46c4c0c.tar.gz
istreamdev-281c41400b062da65dad78209cf9c858d46c4c0c.tar.bz2
Use session number instead of name
-rwxr-xr-xbin/jsonapi.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/jsonapi.php b/bin/jsonapi.php
index a8aa82e..10040cb 100755
--- a/bin/jsonapi.php
+++ b/bin/jsonapi.php
@@ -68,7 +68,7 @@ function startBroadcast($type, $url, $mode)
{
$ret = array();
- $ret['session'] = sessioncreate($type, $url, $mode);
+ $ret['session'] = substr(sessioncreate($type, $url, $mode), strlen("session"));
return json_encode($ret);
}
@@ -77,7 +77,7 @@ function stopBroadcast($session)
{
$ret = array();
- $ret = sessiondelete($session);
+ $ret = sessiondelete("session" .$session);
return json_encode($ret);
}
@@ -86,14 +86,16 @@ function getStreamInfo($session)
{
$ret = array();
- $ret['stream'] = sessiongetinfo($session);
+ $info = sessiongetinfo("session" .$session);
+ $info['session'] = substr($info['session'], strlen("session"));
+ $ret['stream'] = $info;
return json_encode($ret);
}
function getStreamStatus($session)
{
- $ret = sessiongetstatus($session);
+ $ret = sessiongetstatus("session" .$session);
return json_encode($ret);
}