From 907dbf7e8915fb459e4ab1482fd4dbd8c8ea50d4 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 2 Jun 2005 15:03:23 +0000 Subject: Fixed crash in network.cc if socket not connected. Added option to skop ecery second frame in player --- src/socket.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/socket.cc') diff --git a/src/socket.cc b/src/socket.cc index c01e31d..c5a2575 100644 --- a/src/socket.cc +++ b/src/socket.cc @@ -31,6 +31,11 @@ /* * $Log$ + * Revision 1.6 2005/06/02 15:03:23 deva + * + * Fixed crash in network.cc if socket not connected. + * Added option to skop ecery second frame in player + * * Revision 1.5 2005/05/03 17:13:25 deva * Fixed some missong Info object references. * @@ -120,6 +125,7 @@ Socket Socket::slisten() (socklen_t*)&csalen); if (s.ssocket < 0) { + s.connected = false; err = 1; info->error("Socket: accept() failed! %s", strerror(errno)); return s; @@ -134,6 +140,7 @@ Socket Socket::slisten() int Socket::sconnect(char *ip) { if(err) { + connected = false; info->error("Socket: No socket present!"); return err; } @@ -144,6 +151,7 @@ int Socket::sconnect(char *ip) err = connect(ssocket, (struct sockaddr*)&socketaddr, sizeof(socketaddr)); if (err) { + connected = false; info->error("Socket: connect() failed! %s", strerror(errno)); return err; } -- cgit v1.2.3