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.21 by root, Sat Dec 16 03:08:26 2006 UTC vs.
Revision 1.22 by root, Sat Dec 16 21:40:26 2006 UTC

90 status = Ns_Add; 90 status = Ns_Add;
91 mapx = 11; 91 mapx = 11;
92 mapy = 11; 92 mapy = 11;
93 itemcmd = 1; /* Default is version item1 command */ 93 itemcmd = 1; /* Default is version item1 command */
94 94
95 faces_sent_len = nrofpixmaps; 95 faces_sent = salloc<uint8> (nrofpixmaps, 0);
96 faces_sent = (uint8 *)calloc (nrofpixmaps, sizeof (*faces_sent));
97 if (!faces_sent)
98 fatal (OUT_OF_MEMORY);
99 96
100 /* Do this so we don't send a face command for the client for 97 /* Do this so we don't send a face command for the client for
101 * this face. Face 0 is sent to the client to say clear 98 * this face. Face 0 is sent to the client to say clear
102 * face information. 99 * face information.
103 */ 100 */
112 // command handling is even lower priority 109 // command handling is even lower priority
113 // that way no client can monopolise the server 110 // that way no client can monopolise the server
114 cmd_ev.prio (PE_PRIO_NORMAL + 2); 111 cmd_ev.prio (PE_PRIO_NORMAL + 2);
115 112
116 // initialisation done, kick it! 113 // initialisation done, kick it!
117
118 send_packet_printf ("version %d %d %s\n", VERSION_CS, VERSION_SC, VERSION_INFO); 114 send_packet_printf ("version %d %d %s\n", VERSION_CS, VERSION_SC, VERSION_INFO);
119 flush (); 115 flush ();
120 116
121#if 0//TODO 117#if 0//TODO
122 socket_info.nconns++; 118 socket_info.nconns++;
129{ 125{
130 if (pl) 126 if (pl)
131 pl->socket = 0; 127 pl->socket = 0;
132 128
133 if (fd >= 0) 129 if (fd >= 0)
134 close (fd), fd = -1; 130 close (fd);
135 131
136 free (stats.range), stats.range = 0; 132 free (faces_sent);
137 free (stats.title), stats.title = 0; 133 free (stats.range);
138 free (host), host = 0; 134 free (stats.title);
135 free (host);
139} 136}
140 137
141void 138void
142client::destroy () 139client::destroy ()
143{ 140{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines