Merge branch '1216' into v0.6

This commit is contained in:
Peter Šurda 2018-04-11 13:36:41 +02:00
commit bb433fc495
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -12,14 +12,16 @@ if __name__ == "__main__":
import sys import sys
sys.exit(0) sys.exit(0)
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler, SimpleXMLRPCServer
import base64 import base64
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler, SimpleXMLRPCServer
import json import json
from binascii import hexlify, unhexlify from binascii import hexlify, unhexlify
import shared import shared
import time import time
from addresses import decodeAddress,addBMIfNotPresent,decodeVarint,calculateInventoryHash,varintDecodeError from addresses import (decodeAddress, addBMIfNotPresent, decodeVarint,
calculateInventoryHash, varintDecodeError)
from bmconfigparser import BMConfigParser from bmconfigparser import BMConfigParser
import defaults import defaults
import helper_inbox import helper_inbox
@ -27,7 +29,6 @@ import helper_sent
import hashlib import hashlib
import state import state
from pyelliptic.openssl import OpenSSL
import queues import queues
import shutdown import shutdown
from struct import pack from struct import pack
@ -742,6 +743,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
fromAddress, 'enabled') fromAddress, 'enabled')
except: except:
raise APIError(13, 'could not find your fromAddress in the keys.dat file.') raise APIError(13, 'could not find your fromAddress in the keys.dat file.')
streamNumber = decodeAddress(fromAddress)[2]
ackdata = genAckPayload(streamNumber, 0) ackdata = genAckPayload(streamNumber, 0)
toAddress = '[Broadcast subscribers]' toAddress = '[Broadcast subscribers]'
ripe = '' ripe = ''
@ -1066,5 +1068,3 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
except Exception as e: except Exception as e:
logger.exception(e) logger.exception(e)
return "API Error 0021: Unexpected API Failure - %s" % str(e) return "API Error 0021: Unexpected API Failure - %s" % str(e)