dict-size changed-bug hopefully fixed

master
Stefan Krulj 14 years ago
parent 5c4153bc3e
commit 1d3a141a30
  1. 7
      sys/brathuhn.py

@ -15,6 +15,7 @@ group_listeners = []
private_listeners = [] private_listeners = []
status_listeners = [] status_listeners = []
call_ats = dict() call_ats = dict()
call_ats_remove = []
call_ats_id = 0 call_ats_id = 0
join_time = time.time()+60*60*24*365 #1 year in the future join_time = time.time()+60*60*24*365 #1 year in the future
@ -289,10 +290,10 @@ def loop():
to_remove = [] to_remove = []
for cid in call_ats: for cid in call_ats:
call=call_ats[cid] call=call_ats[cid]
if time.time()>=call[1]: if time.time()>=call[1] and call not in call_ats_remove:
call[0](*call[2]) call[0](*call[2])
to_remove.append(cid) to_remove.append(cid)
for cid in to_remove: for cid in to_remove + call_ats_remove:
del call_ats[cid] del call_ats[cid]
except xmpp.protocol.Conflict: except xmpp.protocol.Conflict:
@ -336,7 +337,7 @@ def cancelCall(cid):
@param cid -- The id of the call to remove @param cid -- The id of the call to remove
""" """
if cid in call_ats: if cid in call_ats:
del call_ats[cid] call_ats_remove.append( call_ats[cid] )
def sendFile(to,path,method=SI): def sendFile(to,path,method=SI):
"""Send a file using method specified """Send a file using method specified

Loading…
Cancel
Save