- int retval;
- int i;
- ssize_t rlen;
- const char *result;
- int reslen;
- tcl_connection_t *tclc;
- char in[256];
-
- rlen = read_socket(connection->fd, &in, sizeof(in));
- if (rlen <= 0) {
- if (rlen < 0)
- LOG_ERROR("error during read: %s", strerror(errno));
- return ERROR_SERVER_REMOTE_CLOSED;
- }
-
- tclc = connection->priv;
- if (tclc == NULL)
- return ERROR_CONNECTION_REJECTED;
-
- /* push as much data into the line as possible */
- for (i = 0; i < rlen; i++)
- {
- if (!isprint(in[i]) && !isspace(in[i]))
- {
- /* drop this line */
- tclc->tc_linedrop = 1;
- continue;
- }
-
- /* buffer the data */
- tclc->tc_line[tclc->tc_lineoffset] = in[i];
- if (tclc->tc_lineoffset < TCL_MAX_LINE)
- tclc->tc_lineoffset++;
- else
- tclc->tc_linedrop = 1;
-
- if (in[i] != '\n')
- continue;
-
- /* process the line */
- if (tclc->tc_linedrop) {
+ int retval;
+ int i;
+ ssize_t rlen;
+ const char *result;
+ int reslen;
+ tcl_connection_t *tclc;
+ char in[256];
+
+ rlen = read_socket(connection->fd, &in, sizeof(in));
+ if (rlen <= 0) {
+ if (rlen < 0)
+ LOG_ERROR("error during read: %s", strerror(errno));
+ return ERROR_SERVER_REMOTE_CLOSED;
+ }
+
+ tclc = connection->priv;
+ if (tclc == NULL)
+ return ERROR_CONNECTION_REJECTED;
+
+ /* push as much data into the line as possible */
+ for (i = 0; i < rlen; i++)
+ {
+ if (!isprint(in[i]) && !isspace(in[i]))
+ {
+ /* drop this line */
+ tclc->tc_linedrop = 1;
+ continue;
+ }
+
+ /* buffer the data */
+ tclc->tc_line[tclc->tc_lineoffset] = in[i];
+ if (tclc->tc_lineoffset < TCL_MAX_LINE)
+ tclc->tc_lineoffset++;
+ else
+ tclc->tc_linedrop = 1;
+
+ if (in[i] != '\n')
+ continue;
+
+ /* process the line */
+ if (tclc->tc_linedrop) {