From 03ce8ba8fbf5258365662fb3bb883d5b6710b662 Mon Sep 17 00:00:00 2001 From: "Grant T. Olson" Date: Thu, 29 Aug 2013 08:47:27 -0400 Subject: [PATCH] new API method needs to use helper_sql --- src/bitmessagemain.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index a34e09d5..47ee5865 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -462,13 +462,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): if len(params) == 0: raise APIError(0, 'I need parameters!') ackdata = self._decode(params[0], "hex") - t = (ackdata,) - shared.sqlLock.acquire() - shared.sqlSubmitQueue.put('''UPDATE sent SET folder='trash' WHERE ackdata=?''') - shared.sqlSubmitQueue.put(t) - shared.sqlReturnQueue.get() - shared.sqlSubmitQueue.put('commit') - shared.sqlLock.release() + sqlExecute('''UPDATE sent SET folder='trash' WHERE ackdata=?''', + ackdata) return 'Trashed sent message (assuming message existed).' elif method == 'sendMessage': if len(params) == 0: