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.27 by root, Thu Dec 21 06:12:37 2006 UTC vs.
Revision 1.28 by root, Thu Dec 21 23:37:06 2006 UTC

118 118
119 buflen = sizeof (oldbufsize); 119 buflen = sizeof (oldbufsize);
120 getsockopt (fd, SOL_SOCKET, SO_SNDBUF, (char *) &oldbufsize, (socklen_t *) & buflen); 120 getsockopt (fd, SOL_SOCKET, SO_SNDBUF, (char *) &oldbufsize, (socklen_t *) & buflen);
121 } 121 }
122 122
123 state = ST_SETUP;
123 mapmode = Map0Cmd; 124 mapmode = Map0Cmd;
124 darkness = 1; 125 darkness = 1;
125 mapx = 11; 126 mapx = 11;
126 mapy = 11; 127 mapy = 11;
127 itemcmd = 1; /* Default is version item1 command */ 128 itemcmd = 1; /* Default is version item1 command */
156} 157}
157 158
158client::~client () 159client::~client ()
159{ 160{
160 if (pl) 161 if (pl)
161 pl->socket = 0; 162 pl->ns = 0;
162 163
163 if (fd >= 0) 164 if (fd >= 0)
164 close (fd); 165 close (fd);
165 166
166 sfree<uint8> (faces_sent, nrofpixmaps); 167 sfree<uint8> (faces_sent, nrofpixmaps);
170} 171}
171 172
172void 173void
173client::destroy () 174client::destroy ()
174{ 175{
175 destroyed = true; 176 state = ST_DEAD;
176 177
177 socket_ev.suspend (); 178 socket_ev.suspend ();
178 cmd_ev.suspend (); 179 cmd_ev.suspend ();
179} 180}
180 181

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines