You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_ftp-commits@incubator.apache.org by wr...@apache.org on 2005/12/11 00:16:08 UTC

svn commit: r355824 - /incubator/mod_ftp/trunk/src/ftp_protocol.c

Author: wrowe
Date: Sat Dec 10 16:16:05 2005
New Revision: 355824

URL: http://svn.apache.org/viewcvs?rev=355824&view=rev
Log:

  We can trust apr_socket_atmark() is available, now

Modified:
    incubator/mod_ftp/trunk/src/ftp_protocol.c

Modified: incubator/mod_ftp/trunk/src/ftp_protocol.c
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/src/ftp_protocol.c?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- incubator/mod_ftp/trunk/src/ftp_protocol.c (original)
+++ incubator/mod_ftp/trunk/src/ftp_protocol.c Sat Dec 10 16:16:05 2005
@@ -23,58 +23,10 @@
 #include "mod_ftp.h"
 #include "ftp_config.h"
 
-/* for socket_atmark - move to apr with apr_socket_atmark */
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_SOCKIO_H
-#include <sys/sockio.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
 /* Min # of bytes to allocate when reading a request line */
 #define MIN_LINE_ALLOC 512
 
 
-/* 
- * Moving to apr shortly, this function returns APR_SUCCESS and
- * sets atmark to true if at the mark, or false when not.
- */
-apr_status_t socket_atmark(apr_socket_t *sock, int *atmark)
-{
-    apr_os_sock_t sd;
-    apr_status_t  rv;
-#ifdef WIN32
-    u_long oobmark;
-#else
-    int oobmark;
-#endif
-
-    rv = apr_os_sock_get(&sd, sock);
-
-    if (rv != APR_SUCCESS) {
-        return rv;
-    }
-
-#ifndef SIOCATMARK
-#error FAILED TO COMPILE, SIOCATMARK must be supported!
-#else
-    /* if (apr_socket_atmark(sd->socketdes)) */
-#ifdef WIN32
-    if (ioctlsocket(sd, SIOCATMARK, (void*) &oobmark) < 0)
-#else
-    if (ioctl(sd, SIOCATMARK, (void*) &oobmark) < 0)
-#endif
-        return apr_get_netos_error();
-
-    *atmark = (oobmark != 0);
-#endif
-
-    return APR_SUCCESS;
-}
-
 /*
  * ftp_read_line reads ahead one line from the control channel.
  *
@@ -179,7 +131,7 @@
                 e_next = APR_BUCKET_NEXT(e);
                 if (rv == APR_SUCCESS && APR_BUCKET_IS_SOCKET(e_next)) {
                     apr_socket_t *sock = e_next->data;
-                    rv = socket_atmark(sock, &mark);
+                    rv = apr_socket_atmark(sock, &mark);
                     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
                       fc->connection->base_server, "FTP[%d] frl: atmark: %x %d",
 		      (int) getpid(), (int) rv, mark);