diff options
author | deva <deva> | 2005-06-02 15:03:23 +0000 |
---|---|---|
committer | deva <deva> | 2005-06-02 15:03:23 +0000 |
commit | 907dbf7e8915fb459e4ab1482fd4dbd8c8ea50d4 (patch) | |
tree | 5c6278093dc03a4b2fe35dc6c8a76aef15eea106 /src/socket.cc | |
parent | df793bb0657844c98c0505f47db80798b4ad495e (diff) |
Fixed crash in network.cc if socket not connected.
Added option to skop ecery second frame in player
Diffstat (limited to 'src/socket.cc')
-rw-r--r-- | src/socket.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |