svn commit: r299354 - head/contrib/pf/ftp-proxy
Baptiste Daroussin
bapt at FreeBSD.org
Tue May 10 11:09:27 UTC 2016
Author: bapt
Date: Tue May 10 11:09:26 2016
New Revision: 299354
URL: https://svnweb.freebsd.org/changeset/base/299354
Log:
Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard
Obtained from: OpenBSD
Modified:
head/contrib/pf/ftp-proxy/ftp-proxy.c
Modified: head/contrib/pf/ftp-proxy/ftp-proxy.c
==============================================================================
--- head/contrib/pf/ftp-proxy/ftp-proxy.c Tue May 10 10:26:07 2016 (r299353)
+++ head/contrib/pf/ftp-proxy/ftp-proxy.c Tue May 10 11:09:26 2016 (r299354)
@@ -103,7 +103,7 @@ void client_read(struct bufferevent *, v
int drop_privs(void);
void end_session(struct session *);
void exit_daemon(void);
-int getline(char *, size_t *);
+int get_line(char *, size_t *);
void handle_connection(const int, short, void *);
void handle_signal(int, short, void *);
struct session * init_session(void);
@@ -249,7 +249,7 @@ client_read(struct bufferevent *bufev, v
buf_avail);
s->cbuf_valid += clientread;
- while ((n = getline(s->cbuf, &s->cbuf_valid)) > 0) {
+ while ((n = get_line(s->cbuf, &s->cbuf_valid)) > 0) {
logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf);
if (!client_parse(s)) {
end_session(s);
@@ -343,7 +343,7 @@ exit_daemon(void)
}
int
-getline(char *buf, size_t *valid)
+get_line(char *buf, size_t *valid)
{
size_t i;
@@ -1087,7 +1087,7 @@ server_read(struct bufferevent *bufev, v
buf_avail);
s->sbuf_valid += srvread;
- while ((n = getline(s->sbuf, &s->sbuf_valid)) > 0) {
+ while ((n = get_line(s->sbuf, &s->sbuf_valid)) > 0) {
logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf);
if (!server_parse(s)) {
end_session(s);
More information about the svn-src-all
mailing list