mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
remove redundant parameters
This commit is contained in:
parent
7d81083d7d
commit
11709b21bd
1 changed files with 5 additions and 9 deletions
|
@ -109,12 +109,12 @@ def asGCMIds(con, devids, typ):
|
||||||
cur.execute( query )
|
cur.execute( query )
|
||||||
return [elem[0] for elem in cur.fetchall()]
|
return [elem[0] for elem in cur.fetchall()]
|
||||||
|
|
||||||
def notifyGCM( target, devids, typ, msg, connname, hid ):
|
def notifyGCM( devids, typ, target ):
|
||||||
success = False
|
success = False
|
||||||
if typ == DEVTYPE_GCM:
|
if typ == DEVTYPE_GCM:
|
||||||
if 3 <= target['clntVers']:
|
if 3 <= target['clntVers']:
|
||||||
connname = "%s/%d" % (connname, hid)
|
connname = "%s/%d" % (target['connname'], target['hid'])
|
||||||
data = { 'msg64': msg,
|
data = { 'msg64': target['msg64'],
|
||||||
'connname': connname,
|
'connname': connname,
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
@ -235,12 +235,8 @@ def main():
|
||||||
toDelete = []
|
toDelete = []
|
||||||
for devid in targets.keys():
|
for devid in targets.keys():
|
||||||
target = targets[devid]
|
target = targets[devid]
|
||||||
connname = target['connname']
|
if notifyGCM( asGCMIds(g_con, [devid], typ), typ, target )\
|
||||||
hid = target['hid']
|
and 3 <= target['clntVers']:
|
||||||
msg = target['msg64']
|
|
||||||
if notifyGCM( target, asGCMIds( g_con, [devid], typ ), \
|
|
||||||
typ, msg, connname, hid ) \
|
|
||||||
and 3 <= target['clntVers']:
|
|
||||||
toDelete.append( str(target['id']) )
|
toDelete.append( str(target['id']) )
|
||||||
pruneSent( devids )
|
pruneSent( devids )
|
||||||
deleteMsgs( g_con, toDelete )
|
deleteMsgs( g_con, toDelete )
|
||||||
|
|
Loading…
Add table
Reference in a new issue