似乎又是一个死循环
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
下面是log:
Line:1139 Fun:send_msg Send sms OK!
Line:402 Fun:send content:R fetion.com.cn SIP-C/4.0^M
F: 57???????^M
I: 1^M
Q: 1 R^M
X: 0^M
^M
Line:575 Fun:__split data:
Line:575 Fun:__split data:
Line:575 Fun:__split data:
Line:1206 Fun:receive logout
Line:575 Fun:__split data:
Line:575 Fun:__split data:
Line:575 Fun:__split data:
行号可能有点不一样,我改了一点。
后面就全是Line:575了,exit也不行,只能kill掉了。
看来似乎是发完一条信息,收到280后,又回复了一个Line:402那
段,就进入:
while True and data:
if not re.search("L: (\d+)",data) and not data[-4:] == '\r\n\r\n':
data = self.__sock.recv(bs)
total_data.append(data)
elif not re.search("L: (\d+)",data) and data[-4:] == '\r\n\r\n':
return total_data
else:
break
可能是这个循环出不去,我试过一次,但不是每次都这样。
Original issue reported on code.google.com by liu...@gmail.com
on 25 Nov 2010 at 2:03
Google Code Exporter commented
不好意思,看错了,是这个循环:
while response is '':
try:
ret = self.__tcp_recv()
except socket.error,e:
raise PyFetionSocketError(e)
for rs in ret:
code = self.get_code(rs)
try:
int(code)
response = rs
except exceptions.ValueError:
self.queue.put(rs)
continue
Original comment by liu...@gmail.com
on 25 Nov 2010 at 2:40
Google Code Exporter commented
这个我在最新的代码里面已经改了。
Original comment by cocobear.cn
on 26 Nov 2010 at 2:19
- Changed state: Invalid
Google Code Exporter commented
谢谢!不好意思,刚刚才看到。
Original comment by liu...@gmail.com
on 26 Nov 2010 at 2:46