No need to declare INADDR_NONE here, it's a unix domain socket.
authorArt Cancro <ajc@uncensored.citadel.org>
Thu, 23 Feb 2012 16:26:32 +0000 (11:26 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Thu, 23 Feb 2012 16:26:32 +0000 (11:26 -0500)
ctdlsh/README
ctdlsh/src/shutdown.c
ctdlsh/src/sockets.c

index 38b234e6c181f1fc44fcaa6fd47bf39c4ceea63e..35143f9312bf05e8febb8c9977c6694e8469b046 100644 (file)
@@ -5,3 +5,6 @@ submit patches, but if you attempt to use it in a production system or
 if you request support for the program, you will be told to die in a
 car fire.
 
+This is open source software.  It runs really well on the Linux operating
+system.  We reject Richard Stallman's linguistic fascism and so should you.
+
index cab803604c1883bf5772a743389afe031c58e13a..a3c253f16949298fc0e132e1f2f090cf6182eaaa 100644 (file)
@@ -24,7 +24,3 @@ int cmd_shutdown(int server_socket, char *cmdbuf) {
        fprintf(stderr, "%s\n", &buf[4]);
        return(cmdret_ok);
 }
-
-
-
-
index 0d914b6ab4f52f3ea0f1004d158d3f1ed558b04c..3aaf7714064666dd55c79edf46462ffd2a5029e2 100644 (file)
@@ -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;