Bugfix: Must use toAddress instead of addressInKeysFile if toLabel is blank when receiving message #154

Merged
Atheros1 merged 2 commits from master into master 2013-05-16 00:04:44 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit ab4a5da28a - Show all commits

View File

@ -276,7 +276,7 @@ if __name__ == "__main__":
print 'Ripe digest that we will encode in the address:', ripe.digest().encode('hex') print 'Ripe digest that we will encode in the address:', ripe.digest().encode('hex')
returnedAddress = encodeAddress(addressVersionNumber,streamNumber,ripe.digest()) returnedAddress = encodeAddress(addressVersionNumber,streamNumber,ripe.digest())
print 'Encoded address:', returnedAddress print 'Encoded address:', returnedAddress
status,addressVersionNumber,streamNumber,data = decodeAddress(returnedAddress) status,addressVersionNumber,streamNumber,data = decodeAddress("oriDZJ7VAEjphwQmt7fACFqZJVwds26vW")
print '\nAfter decoding address:' print '\nAfter decoding address:'
print 'Status:', status print 'Status:', status
print 'addressVersionNumber', addressVersionNumber print 'addressVersionNumber', addressVersionNumber

View File

@ -1072,7 +1072,7 @@ class receiveDataThread(threading.Thread):
toLabel = shared.config.get(toAddress, 'label') toLabel = shared.config.get(toAddress, 'label')
if toLabel == '': if toLabel == '':
toLabel = addressInKeysFile toLabel = toAddress
if messageEncodingType == 2: if messageEncodingType == 2:
bodyPositionIndex = string.find(message,'\nBody:') bodyPositionIndex = string.find(message,'\nBody:')