mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
properly send protocol version
This commit is contained in:
parent
5a21a79eb8
commit
ef3e1c3da4
1 changed files with 3 additions and 3 deletions
|
@ -878,7 +878,7 @@ class HttpSyncServerProxy(SyncServer):
|
||||||
self.password = passwd
|
self.password = passwd
|
||||||
self.syncURL="http://anki.ichi2.net/sync/"
|
self.syncURL="http://anki.ichi2.net/sync/"
|
||||||
#self.syncURL="http://localhost:8001/sync/"
|
#self.syncURL="http://localhost:8001/sync/"
|
||||||
self.protocolVersion = 2
|
self.protocolVersion = 3
|
||||||
self.sourcesToCheck = []
|
self.sourcesToCheck = []
|
||||||
|
|
||||||
def connect(self, clientVersion=""):
|
def connect(self, clientVersion=""):
|
||||||
|
@ -889,7 +889,8 @@ class HttpSyncServerProxy(SyncServer):
|
||||||
d = self.runCmd("getDecks",
|
d = self.runCmd("getDecks",
|
||||||
libanki=anki.version,
|
libanki=anki.version,
|
||||||
client=clientVersion,
|
client=clientVersion,
|
||||||
sources=simplejson.dumps(self.sourcesToCheck))
|
sources=simplejson.dumps(self.sourcesToCheck),
|
||||||
|
pversion=self.protocolVersion)
|
||||||
socket.setdefaulttimeout(None)
|
socket.setdefaulttimeout(None)
|
||||||
if d['status'] != "OK":
|
if d['status'] != "OK":
|
||||||
raise SyncError(type="authFailed", status=d['status'])
|
raise SyncError(type="authFailed", status=d['status'])
|
||||||
|
@ -955,7 +956,6 @@ class HttpSyncServerProxy(SyncServer):
|
||||||
class HttpSyncServer(SyncServer):
|
class HttpSyncServer(SyncServer):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
SyncServer.__init__(self)
|
SyncServer.__init__(self)
|
||||||
self.protocolVersion = 2
|
|
||||||
self.decks = {}
|
self.decks = {}
|
||||||
self.deck = None
|
self.deck = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue