CVS commit by johnflux: Check the value of 'read' and show the user an error if it fails. M +6 -1 server.cpp 1.235 --- kdeextragear-2/konversation/konversation/server.cpp #1.234:1.235 @@ -15,4 +15,5 @@ #include #include +#include #ifdef __linux__ @@ -958,5 +959,9 @@ void Server::incoming() len = read(serverSocket.fd(),buffer,BUFFER_LEN-1); - + if(len==-1) { + statusView->appendServerMessage(i18n("Error"),i18n("There was an error reading the data from the server: %1").arg(strerror(errno))); + broken(0); + return; + } buffer[len] = 0;