Lines Matching refs:linebuf

121 char linebuf[MAX_LINE + 1];
163 if (linebuf[0] == 'P' || linebuf[0] == 'p' ||
164 linebuf[0] == 'E' || linebuf[0] == 'e') {
178 if (anonymous_only && (linebuf[0] == 'U' || linebuf[0] == 'u'))
187 if (strcasecmp("USER ftp\r\n", linebuf) != 0 &&
188 strcasecmp("USER anonymous\r\n", linebuf) != 0) {
189 snprintf(linebuf, sizeof linebuf,
191 logmsg(LOG_DEBUG, "#%d proxy: %s", s->id, linebuf);
194 linelen = strlen(linebuf);
195 bufferevent_write(s->client_bufev, linebuf, linelen);
198 linebuf[0] = '\0';
208 if (strncasecmp("PASV", linebuf, 4) == 0)
210 else if (strncasecmp("PORT ", linebuf, 5) == 0)
212 else if (strncasecmp("EPSV", linebuf, 4) == 0)
214 else if (strncasecmp("EPRT ", linebuf, 5) == 0)
228 linebuf);
233 logmsg(LOG_DEBUG, "#%d proxy: %s", s->id, linebuf);
253 logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf);
258 bufferevent_write(s->server_bufev, linebuf, linelen);
353 /* Copy to linebuf while searching for a newline. */
355 linebuf[i] = buf[i];
364 linebuf[0] = '\0';
372 linebuf[linelen] = '\0';
808 for (p = linebuf + linelen; p > linebuf; p--)
811 if (p == linebuf)
867 r = snprintf(linebuf, sizeof linebuf,
872 r = snprintf(linebuf, sizeof linebuf,
878 r = snprintf(linebuf, sizeof linebuf,
881 r = snprintf(linebuf, sizeof linebuf,
885 r = snprintf(linebuf, sizeof linebuf,
890 if (r < 0 || ((u_int)r) >= sizeof linebuf) {
892 linebuf[0] = '\0';
901 if (linebuf[i] == '.')
902 linebuf[i] = ',';
928 if (s->cmd == CMD_NONE || linelen < 4 || linebuf[0] != '2')
931 if ((s->cmd == CMD_PASV && strncmp("227 ", linebuf, 4) == 0) ||
932 (s->cmd == CMD_EPSV && strncmp("229 ", linebuf, 4) == 0))
976 linebuf);
988 logmsg(LOG_DEBUG, "#%d proxy: %s", s->id, linebuf);
1091 logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf);
1096 bufferevent_write(s->client_bufev, linebuf, linelen);