--- deliantra/server/socket/request.C 2006/09/12 19:20:09 1.17 +++ deliantra/server/socket/request.C 2006/09/14 19:08:41 1.18 @@ -1,7 +1,7 @@ /* * static char *rcsid_init_c = - * "$Id: request.C,v 1.17 2006/09/12 19:20:09 root Exp $"; + * "$Id: request.C,v 1.18 2006/09/14 19:08:41 root Exp $"; */ /* @@ -52,8 +52,6 @@ * esrv_map_doneredraw finishes the map update, and ships across the * map updates. * - * esrv_map_scroll tells the client to scroll the map, and does similarily - * for the locally cached copy. */ #include @@ -1446,9 +1444,8 @@ { /* All of this is just accounting stuff */ if (tframes > 100) - { - tframes = tbytes = 0; - } + tframes = tbytes = 0; + tframes++; frames++; tbytes += sl.len; @@ -1457,6 +1454,7 @@ Send_With_Handling (ns, &sl); ns->sent_scroll = 0; } + free (sl.buf); } @@ -2223,17 +2221,19 @@ ewhatflag &= (~EMI_NOREDRAW); esl.buf[ewhatstart + 1] = ewhatflag & 0xff; } + if (esl.len > estartlen) - { - Send_With_Handling (&socket, &esl); - } + Send_With_Handling (&socket, &esl); + free (esl.buf); } + if (sl.len > startlen || socket.sent_scroll) { Send_With_Handling (&socket, &sl); socket.sent_scroll = 0; } + free (sl.buf); }