From 1c9e290982c82d69e6361a8d6b3a9a345e406bc7 Mon Sep 17 00:00:00 2001
From: James <james@sourcefabric-DX4840.(none)>
Date: Mon, 20 Aug 2012 16:03:29 -0400
Subject: [PATCH] CC-4218: Live resource: Cannot connect live resource.

- fixed
---
 python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py | 2 +-
 python_apps/pypo/liquidsoap_scripts/ls_script.liq      | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py b/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py
index 7f6f3817c..862231cc2 100644
--- a/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py
+++ b/python_apps/pypo/liquidsoap_scripts/liquidsoap_auth.py
@@ -13,6 +13,6 @@ if dj_type == '--master':
 elif dj_type == '--dj':
     source_type = 'dj'
 
-response = api_clients.check_live_stream_auth(username, password, type)
+response = api_clients.check_live_stream_auth(username, password, source_type)
 
 print response['msg']
diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq
index 5b6e8f668..c3bec6818 100644
--- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq
+++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq
@@ -160,19 +160,18 @@ end
 
 #auth function for live stream
 def check_master_dj_client(user,password) =
+        log("master connected")
         #get the output of the php script
         ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --master #{user} #{password}")
         #ret has now the value of the live client (dj1,dj2, or djx), or "ERROR"/"unknown" ...
         ret = list.hd(ret)
+        
         #return true to let the client transmit data, or false to tell harbor to decline
-        if (ret == "True") then
-            true
-        else
-            false
-        end
+        ret == "True"
 end
 
 def check_dj_client(user,password) =
+        log("live dj connected")
         #get the output of the php script
         ret = get_process_lines("python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_auth.py --dj #{user} #{password}")
         #ret has now the value of the live client (dj1,dj2, or djx), or "ERROR"/"unknown" ...