ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/init.C
(Generate patch)

Comparing deliantra/server/socket/init.C (file contents):
Revision 1.31 by root, Mon Dec 25 11:25:50 2006 UTC vs.
Revision 1.33 by pippijn, Sat Jan 6 14:42:31 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2001 Mark Wedel 5 Copyright (C) 2001 Mark Wedel
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
162#endif 163#endif
163} 164}
164 165
165client::~client () 166client::~client ()
166{ 167{
168 sockvec::iterator i = find (clients.begin (), clients.end (), this);
169 if (i != clients.end ())
170 clients.erase (i);
171
167 sfree<uint8> (faces_sent, nrofpixmaps); 172 sfree<uint8> (faces_sent, nrofpixmaps);
168 free (stats.range); 173 free (stats.range);
169 free (stats.title); 174 free (stats.title);
170 free (host); 175 free (host);
171} 176}
172 177
173void 178void
174client::do_destroy () 179client::do_destroy ()
175{ 180{
176 attachable::do_destroy (); 181 attachable::do_destroy ();
177
178 sockvec::iterator i = find (clients.begin (), clients.end (), this);
179 if (i != clients.end ())
180 clients.erase (i);
181 182
182 if (pl) 183 if (pl)
183 pl->disconnect (); 184 pl->disconnect ();
184 185
185 if (fd >= 0) 186 if (fd >= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines