X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=ctdlsh%2Fsrc%2Fsockets.c;h=3aaf7714064666dd55c79edf46462ffd2a5029e2;hp=0d914b6ab4f52f3ea0f1004d158d3f1ed558b04c;hb=9c2ebc50efa9c120b1969e78cea2f5256416b5b9;hpb=ade41bf0c450c635bb0757cf847b8abb9625053e diff --git a/ctdlsh/src/sockets.c b/ctdlsh/src/sockets.c index 0d914b6ab..3aaf77140 100644 --- a/ctdlsh/src/sockets.c +++ b/ctdlsh/src/sockets.c @@ -1,12 +1,14 @@ /* - * + * This file contains functions which handle ctdlsh's connection + * to the Citadel server's admin socket. + * + * Copyright (c) 2009-2012 by the Citadel.org team. + * This program is open source software, cheerfully made available to you under + * the terms of the GNU General Public License version 3. */ #include "ctdlsh.h" -#ifndef INADDR_NONE -#define INADDR_NONE 0xffffffff -#endif int uds_connectsock(char *sockpath) { @@ -102,7 +104,6 @@ int sock_write(int sock, char *buf, int nbytes) } - /* * Input string from socket - implemented in terms of sock_read() * @@ -138,9 +139,8 @@ int sock_getln(int sock, char *buf, int bufsize) } - /* - * sock_puts() - send line to server - implemented in terms of serv_write() + * sock_puts() - send line to server - implemented in terms of sock_write() * Returns the number of bytes written, or -1 for error. */ int sock_puts(int sock, char *buf) @@ -155,6 +155,9 @@ int sock_puts(int sock, char *buf) } +/* + * Write a formatted string to the server - implemented in terms of sock_write() + */ void sock_printf(int sock, const char *format,...) { va_list arg_ptr;