electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit c6fa553f2f30bef866f98c130c3f7961f7dea7ec
parent 2669f2dc2ec32d354ac8c2a6a0bf7c143450920f
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 11 Jan 2012 17:28:10 +0300

add json calls related to sessions

Diffstat:
Mserver/server.py | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/server/server.py b/server/server.py @@ -363,7 +363,7 @@ def get_cache(pw,addr): return 'wrong password' -def cmd_poll(session_id): +def poll_session(session_id): session = sessions.get(session_id) if session is None: print time.asctime(), "session not found", session_id @@ -537,7 +537,7 @@ def do_command(cmd, data, ipaddr): out = '' elif cmd=='poll': - out = cmd_poll(data) + out = poll_session(data) elif cmd == 'h': # history @@ -663,7 +663,9 @@ def jsonrpc_thread(store): server.register_function(get_cache, 'get_cache') server.register_function(send_tx, 'blockchain.transaction.broadcast') server.register_function(store.get_history, 'blockchain.address.get_history') - server.register_function(new_session, 'new_session') + server.register_function(new_session, 'session.new') + server.register_function(update_session, 'session.update') + server.register_function(poll_session, 'session.poll') server.serve_forever()