[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 125986] crash when deleting text
From: Laco Gubik <lacogubik () seznam ! cz>
Date: 2006-04-21 22:12:46
Message-ID: 20060421221246.27873.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=125986
------- Additional Comments From lacogubik seznam cz 2006-04-22 00:12 -------
No I cant reproduce crash, It happened just once up now. It was was with this file (a \
was deleting lines about line 52):
#server program
from socket import *
#Constants
port = 8888
host = "localhost"
msg_welcome = "Welcome on chat server "
msg_connectError = "Error in comunication occured"
term = "CLOSE"
#Functions
#Gets client name and response with welcome message
def open():
name = receivedData[4:]
data = msg_welcome + name + term
newSocket.send(data)
#adds name+address into list <------ TODO
newSocket.close()
return
def msg():
msg_data = receivedData[3:]
data = msg_data + term
#sends to everybody <------- TODO
newSocket.send(data)
newSocket.close()
def quit():
data = receivedData + term
newSocket.send(data)
newSocket.close()
print "Disconnected from", address
#Create an INET, STREAMing socket and bind the socket to port, and hostname
serversocket = socket(AF_INET, SOCK_STREAM)
serversocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
serversocket.bind((host, port))
#Prints hostname <--- TODO
#name = socket.gethostname()
print "Hostname: "#, name
#set the number of clients waiting for conection
serversocket.listen(5)
try:
while 1:
#accept connections from outside
(newSocket, address) = serversocket.accept()
print "Connected from", address
receivedData = newSocket.recv(1024)
if receivedData[:4] == "OPEN":
open()
elif receivedData[:3] == "MSG":
msg()
elif receivedData[:4] == "QUIT":
quit()
else:
newSocket.send(msg_connectError)
finally:
serversocket.close()
#now do something with the client socket, threaded server
#ct = client_thread(cliensocket)
#ct.run()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic