summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/piztor/ptp.rst8
-rw-r--r--server/piztor/server.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/server/piztor/ptp.rst b/server/piztor/ptp.rst
index 3ba2c34..4473e5c 100644
--- a/server/piztor/ptp.rst
+++ b/server/piztor/ptp.rst
@@ -1,4 +1,4 @@
-Piztor Transmission Protocol v2.0b
+Piztor Transmission Protocol v2.0c
----------------------------------
- Pull
@@ -315,7 +315,7 @@ Piztor Transmission Protocol v2.0b
::
- ----+----8b----+----8b-----+----4b----+
- ... | LATITUDE | LONGITUDE | DEADLINE |
- ----+----------+-----------+----int---+
+ ----+--1b---+----8b----+----8b-----+----4b----+
+ ... | LEVEL | LATITUDE | LONGITUDE | DEADLINE |
+ ----+-uchar-+----------+-----------+----int---+
diff --git a/server/piztor/server.py b/server/piztor/server.py
index d9e8bc3..51cf649 100644
--- a/server/piztor/server.py
+++ b/server/piztor/server.py
@@ -89,8 +89,8 @@ class PushLocationData(PushData):
self.pack(0x01, struct.pack("!Ldd", uid, lat, lng))
class PushMarkerData(PushData):
- def __init__(self, lat, lng, deadline):
- self.pack(0x02, struct.pack("!ddl", lat, lng, deadline))
+ def __init__(self, perm, lat, lng, deadline):
+ self.pack(0x02, struct.pack("!Bddl", lat, lng, deadline))
class PushTunnel(object):
def __init__(self, uid):
@@ -638,7 +638,7 @@ class SetMarkerHandler(RequestHandler):
if uid == uauth.uid: continue
if pt.has_key(uid):
tunnel = pt[uid]
- tunnel.add(PushMarkerData(lat, lng, deadline))
+ tunnel.add(PushMarkerData(u.perm, lat, lng, deadline))
tunnel.push()
logger.info("Set marker successfully!")
return self.pack(struct.pack("!B", _StatusCode.sucess))