Skip to content

Commit 0ad36d0

Browse files
author
Jonathan Warren
committed
Merge pull request #307 from Atheros1/master
Store msgid in sent table
2 parents 73f3b5d + c6291f5 commit 0ad36d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/class_singleWorker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,10 @@ def sendBroadcast(self):
414414
# Update the status of the message in the 'sent' table to have
415415
# a 'broadcastsent' status
416416
shared.sqlLock.acquire()
417-
t = ('broadcastsent', int(
417+
t = (inventoryHash,'broadcastsent', int(
418418
time.time()), fromaddress, subject, body, 'broadcastqueued')
419419
shared.sqlSubmitQueue.put(
420-
'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
420+
'UPDATE sent SET msgid=?, status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
421421
shared.sqlSubmitQueue.put(t)
422422
queryreturn = shared.sqlReturnQueue.get()
423423
shared.sqlSubmitQueue.put('commit')
@@ -774,8 +774,8 @@ def sendMsg(self):
774774
# Update the status of the message in the 'sent' table to have a
775775
# 'msgsent' status
776776
shared.sqlLock.acquire()
777-
t = (ackdata,)
778-
shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgsent' WHERE ackdata=?''')
777+
t = (inventoryHash,ackdata,)
778+
shared.sqlSubmitQueue.put('''UPDATE sent SET msgid=?, status='msgsent' WHERE ackdata=?''')
779779
shared.sqlSubmitQueue.put(t)
780780
queryreturn = shared.sqlReturnQueue.get()
781781
shared.sqlSubmitQueue.put('commit')

0 commit comments

Comments
 (0)