diff --git a/protocol.md b/protocol.md --- a/protocol.md +++ b/protocol.md @@ -1,4 +1,4 @@ -# Protocol # +# Protocol v0.1 # [Communication protocol proposal. Not yet fully implemented and still expected to change.] @@ -40,7 +40,7 @@ hash - [(int) i0, ...] index: list of requested node keys from the HashTree data -- (int) index: requested data block number in the data file. Returns blockSize bytes starting at blockSize * index. +- [(int) i0, ...] index: list of requested data blocks from the data file. Returns blockSize bytes starting at blockSize * i. #### Responses #### - [send](#send) diff --git a/src/morevna.sh b/src/morevna.sh --- a/src/morevna.sh +++ b/src/morevna.sh @@ -16,7 +16,7 @@ sudo cryptsetup open --type=luks /dev/lo sudo mount /dev/mapper/ext2luks ~/temp sudo rdiff-backup -v 5 ~/Dokumenty ~/temp/Dokumenty -sudo rdiff-backup -v 5 --exclude '**/__pycache__/' ~/Projekty ~/temp/Projekty +sudo rdiff-backup -v 5 --exclude-regexp '/__pycache__/' ~/Projekty ~/temp/Projekty sudo rdiff-backup -v 5 ~/Obrázky ~/temp/Obrázky sudo umount /dev/mapper/ext2luks diff --git a/src/networkers.py b/src/networkers.py --- a/src/networkers.py +++ b/src/networkers.py @@ -41,7 +41,7 @@ class NetworkWriter: stats.logSent(msg) def prepMsg(self,jsonData,binData=b""): - jsonData=bytes(json.dumps(jsonData)+"\n",encoding="utf-8") + jsonData=bytes(json.dumps(jsonData,separators=(',',':'))+"\n",encoding="utf-8") jsonLength=bytes("json-length: "+str(len(jsonData))+"\n",encoding="utf-8") binLength=bytes("bin-length: "+str(len(binData))+"\n",encoding="utf-8")