#include "rsync.h"
-/* Establish a proxy connection on an open socket to a web roxy by
- * using the CONNECT method. */
+/**
+ * Establish a proxy connection on an open socket to a web proxy by
+ * using the HTTP CONNECT method.
+ **/
static int establish_proxy_connection(int fd, char *host, int port)
{
char buffer[1024];
buffer);
return -1;
}
- for (cp = &buffer[5]; isdigit(*cp) || (*cp == '.'); cp++)
+ for (cp = &buffer[5]; isdigit((int) *cp) || (*cp == '.'); cp++)
;
while (*cp == ' ')
cp++;
-/****************************************************************************
-set user socket options
-****************************************************************************/
+/**
+ * Set user socket options
+ **/
void set_socket_options(int fd, char *options)
{
char *tok;
free(options);
}
-/****************************************************************************
-become a daemon, discarding the controlling terminal
-****************************************************************************/
+/**
+ * Become a daemon, discarding the controlling terminal
+ **/
void become_daemon(void)
{
int i;
}
-/*******************************************************************
-this is like socketpair but uses tcp. It is used by the Samba
-regression test code
-The function guarantees that nobody else can attach to the socket,
-or if they do that this function fails and the socket gets closed
-returns 0 on success, -1 on failure
-the resulting file descriptors are symmetrical
- ******************************************************************/
+/**
+ * This is like socketpair but uses tcp. It is used by the Samba
+ * regression test code.
+ *
+ * The function guarantees that nobody else can attach to the socket,
+ * or if they do that this function fails and the socket gets closed
+ * returns 0 on success, -1 on failure the resulting file descriptors
+ * are symmetrical.
+ **/
static int socketpair_tcp(int fd[2])
{
int listener;