summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-31 16:08:00 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-31 16:08:00 +0800
commit343d3e25a3ebba667285fd51a23c42c08a07142a (patch)
tree8252de8b167351317467765ddbfe065f6315d9c7
parent8beda67ffe9659c7accc15bc115e6ecba35d3611 (diff)
ptp v2.0b
-rw-r--r--server/piztor/ptp.rst24
-rw-r--r--server/piztor/ptp_send.py2
2 files changed, 24 insertions, 2 deletions
diff --git a/server/piztor/ptp.rst b/server/piztor/ptp.rst
index 6d8ff30..be63205 100644
--- a/server/piztor/ptp.rst
+++ b/server/piztor/ptp.rst
@@ -1,4 +1,4 @@
-Piztor Transmission Protocol v2.0a
+Piztor Transmission Protocol v2.0b
----------------------------------
- Pull
@@ -255,6 +255,28 @@ Piztor Transmission Protocol v2.0a
- ``0x01`` for invalid token
- ``0x02`` for insufficient level
+ - Change Password ``0x08``
+
+ - Request
+
+ ::
+
+ +-------------+-------?b-------+-------?b-------+
+ | AUTH_HEAD | OLD_PASSWORD | NEW_PASSWORD |
+ +-------------+-----string-----+-----string-----+
+
+ - Response
+
+ ::
+
+ +--------+
+ | STATUS |
+ +--------+
+
+ - ``0x00`` for success
+ - ``0x01`` for invalid token
+ - ``0x02`` for wrong password
+
- Push Notification
- General Request
diff --git a/server/piztor/ptp_send.py b/server/piztor/ptp_send.py
index e910701..96f7726 100644
--- a/server/piztor/ptp_send.py
+++ b/server/piztor/ptp_send.py
@@ -25,7 +25,7 @@ class _SectionSize:
PADDING = 1
host = "202.120.7.4" #"localhost"
-port = 2224
+port = 2223
def pack_data(optcode, data):
return pack("!LB", _SectionSize.LENGTH + \