Add chan true/false to listAddresses results #480

Merged
grant-olson merged 1 commits from chan_in_listAddress into master 2013-09-05 02:20:49 +02:00

View File

@ -168,8 +168,12 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
data data
if len(data) > 20: if len(data) > 20:
data += ',' data += ','
if shared.config.has_option(addressInKeysFile, 'chan'):
chan = shared.config.getboolean(addressInKeysFile, 'chan')
else:
chan = False
data += json.dumps({'label': shared.config.get(addressInKeysFile, 'label'), 'address': addressInKeysFile, 'stream': data += json.dumps({'label': shared.config.get(addressInKeysFile, 'label'), 'address': addressInKeysFile, 'stream':
streamNumber, 'enabled': shared.config.getboolean(addressInKeysFile, 'enabled')}, indent=4, separators=(',', ': ')) streamNumber, 'enabled': shared.config.getboolean(addressInKeysFile, 'enabled'), 'chan': chan}, indent=4, separators=(',', ': '))
data += ']}' data += ']}'
return data return data
elif method == 'listAddressBook' or method == 'listAddressbook': elif method == 'listAddressBook' or method == 'listAddressbook':