From 281c41400b062da65dad78209cf9c858d46c4c0c Mon Sep 17 00:00:00 2001 From: TheTroll Date: Wed, 17 Mar 2010 14:46:10 +0100 Subject: Use session number instead of name --- bin/jsonapi.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin/jsonapi.php') 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); } -- cgit v1.2.3