summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorTeddy <[email protected]>2013-08-29 16:29:29 +0800
committerTeddy <[email protected]>2013-08-29 16:29:29 +0800
commit3528fbd730a6d28e7e0139d00bcf04b36644e8f8 (patch)
tree2fcdee6019734bddbebe033f44d3f85f3eb6bdc5 /server
parentdb9f2279046293ea4655c9368fd53e7c7b24f6f8 (diff)
do not push to the sender itself
Diffstat (limited to 'server')
-rw-r--r--server/piztor/server.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/piztor/server.py b/server/piztor/server.py
index a4101ef..1814a39 100644
--- a/server/piztor/server.py
+++ b/server/piztor/server.py
@@ -292,6 +292,7 @@ class LocationUpdateHandler(RequestHandler):
pdata = PushLocationData(uauth.uid, lat, lng)
for user in ulist:
uid = user.id
+ if uid == uauth.uid: continue
if pt.has_key(uid):
tunnel = pt[uid]
tunnel.add(pdata)
@@ -557,6 +558,7 @@ class SendTextMessageHandler(RequestHandler):
for user in ulist:
uid = user.id
+ if uid == uauth.uid: continue
if pt.has_key(uid):
tunnel = pt[uid]
tunnel.add(PushTextMesgData(mesg))
@@ -668,6 +670,6 @@ from twisted.internet import reactor
f = PTPFactory()
f.protocol = PTP
-reactor.listenTCP(2223, f)
+reactor.listenTCP(2222, f)
logger.warning("The server is lanuched")
reactor.run()