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

Comparing deliantra/server/socket/loop.C (file contents):
Revision 1.23 by root, Sat Dec 16 17:16:52 2006 UTC vs.
Revision 1.24 by root, Sat Dec 16 18:39:26 2006 UTC

76 { 76 {
77 reset_state (); 77 reset_state ();
78 send_packet_printf ("drawinfo %d too many commands in queue, ignoring.", NDI_RED); 78 send_packet_printf ("drawinfo %d too many commands in queue, ignoring.", NDI_RED);
79 } 79 }
80 else 80 else
81 {
81 cmd_queue.push_back (command ( 82 cmd_queue.push_back (command ());
82 stamp, handler, (char *)salloc (datalen + 1, data), datalen 83 command &cmd = cmd_queue.back ();
83 )); 84 cmd.stamp = stamp;
85 cmd.handler = handler;
86 cmd.data = (char *)salloc (datalen + 1, data);
87 cmd.datalen = datalen;
88 }
84} 89}
85 90
86bool 91bool
87client::handle_command () 92client::handle_command ()
88{ 93{
100 send_packet_printf ("drawinfo %d ignoring delayed command.", NDI_RED); 105 send_packet_printf ("drawinfo %d ignoring delayed command.", NDI_RED);
101 } 106 }
102 else 107 else
103 execute (cmd.handler, cmd.data, cmd.datalen); 108 execute (cmd.handler, cmd.data, cmd.datalen);
104 109
105 sfree (cmd.data, cmd.datalen);
106 cmd_queue.pop_front (); 110 cmd_queue.pop_front ();
107 111
108 return true; 112 return true;
109} 113}
110 114

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines