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

Comparing deliantra/server/socket/lowlevel.C (file contents):
Revision 1.92 by root, Thu Nov 15 04:50:50 2012 UTC vs.
Revision 1.95 by root, Sun Nov 18 09:37:56 2012 UTC

132 if (inbuf_len >= 2 + pkt_len) 132 if (inbuf_len >= 2 + pkt_len)
133 return 2 + pkt_len; 133 return 2 + pkt_len;
134 134
135 if (inbuf_len == sizeof (inbuf)) 135 if (inbuf_len == sizeof (inbuf))
136 { 136 {
137 send_packet_printf ("drawinfo %d input buffer overflow - closing connection.", NDI_RED | NDI_REPLY); 137 send_packet_printf ("msg %d log input buffer overflow - closing connection.", NDI_RED | NDI_REPLY);
138 destroy (); 138 destroy ();
139 return -1; 139 return -1;
140 } 140 }
141 } 141 }
142 142
239 } 239 }
240 else 240 else
241 ((void (*)(char *, int, client *))pkt->cb)((char *)data, datalen, this); 241 ((void (*)(char *, int, client *))pkt->cb)((char *)data, datalen, this);
242 } 242 }
243 else 243 else
244 send_packet_printf ("drawinfo %d ERROR: you cannot execute '%s' now.", NDI_RED | NDI_REPLY, pkt->name); 244 send_packet_printf ("drawinfo %d log ERROR: you cannot execute '%s' now.", NDI_RED | NDI_REPLY, pkt->name);
245} 245}
246 246
247bool 247bool
248client::handle_packet () 248client::handle_packet ()
249{ 249{
291 291
292 goto next_packet; 292 goto next_packet;
293 } 293 }
294 294
295 // If we get here, we didn't find a valid command. 295 // If we get here, we didn't find a valid command.
296 send_packet_printf ("drawinfo %d ERROR: command '%s' not supported.", NDI_RED | NDI_REPLY, (char *)inbuf + 2); 296 send_packet_printf ("msg %d log ERROR: command '%s' not supported.", NDI_RED | NDI_REPLY, (char *)inbuf + 2);
297 297
298next_packet: 298next_packet:
299 inbuf [pkt_len] = save_byte; // rather ugly 299 inbuf [pkt_len] = save_byte; // rather ugly
300 skip_packet (pkt_len); 300 skip_packet (pkt_len);
301 301

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines