+ *endp = *src++;
+ /*
+ * Yuck. Stuck. To make sure we stay backward compatible,
+ * we must assume that either CR or LF terminates the message
+ * and not CR-LF. By allowing CR or LF (alone) into the body
+ * of messages, backward compatibility is lost and major
+ * problems will arise. - Avalon
+ */
+ if (IsEol(*endp))
+ {
+ /* Skip extra LF/CR's */
+ if (endp == client_buffer)
+ continue;
+ *endp = '\0';
+
+ update_messages_received(cptr);
+
+ if (parse_client(cptr, cli_buffer(cptr), endp) == CPTR_KILLED)
+ return CPTR_KILLED;
+ /* Socket is dead so exit */
+ if (IsDead(cptr))
+ return exit_client(cptr, cptr, &me, cli_info(cptr));
+ else if (IsServer(cptr))
+ {
+ cli_count(cptr) = 0;
+ return server_dopacket(cptr, src, length);
+ }
+ endp = client_buffer;
+ }
+ else if (endp < client_buffer + BUFSIZE)
+ /* There is always room for the null */
+ ++endp;