* Added 'author' command-line arg to aidepost. Closes enhancement request
authorArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2000 03:43:09 +0000 (03:43 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2000 03:43:09 +0000 (03:43 +0000)
  #71 on bugzilla.
* Put the default SMTP and POP3 ports back to 25 and 110.  Now that the
  unix domain socket bug is fixed, it's ok if these binds fail.

citadel/ChangeLog
citadel/aidepost.c
citadel/serv_imap.c
citadel/setup.c

index e6365488f91f29c3e1c7fff70f68650472d5efa0..67406c08c97d9fd5ea67b0df893211da46b3c2d3 100644 (file)
@@ -1,4 +1,10 @@
  $Log$
+ Revision 572.34  2000/09/01 03:43:09  ajc
+ * Added 'author' command-line arg to aidepost.  Closes enhancement request
+   #71 on bugzilla.
+ * Put the default SMTP and POP3 ports back to 25 and 110.  Now that the
+   unix domain socket bug is fixed, it's ok if these binds fail.
+
  Revision 572.33  2000/08/31 23:02:15  ajc
  * ig_tcp_server() and ig_uds_server()  -  check to make sure queue length is
    always at least 5.  Zero-length queues can cause connection lockups.
@@ -2018,3 +2024,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
+
index 935df22b7af9491ddfecb18c3837aed1149cfa9e..81fbe7784328ba00395118745f36c518d3591777 100644 (file)
@@ -14,7 +14,7 @@
 #include "citadel.h"
 #include "config.h"
 
-void make_message(FILE *fp, char *target_room)
+void make_message(FILE *fp, char *target_room, char *author)
 {
        int a;
        long bb, cc;
@@ -27,7 +27,7 @@ void make_message(FILE *fp, char *target_room)
        putc(0, fp);
        fprintf(fp, "T%ld", (long)now);
        putc(0, fp);
-       fprintf(fp, "ACitadel");
+       fprintf(fp, "A%s", author);
        putc(0, fp);
        fprintf(fp, "O%s", target_room);
        putc(0, fp);
@@ -53,6 +53,7 @@ int main(int argc, char **argv)
 {
        char tempspool[64];
        char target_room[ROOMNAMELEN];
+       char author[64];
        FILE *tempfp, *spoolfp;
        int ch;
        int i;
@@ -60,12 +61,18 @@ int main(int argc, char **argv)
        get_config();
 
        strcpy(target_room, "Aide");
+       strcpy(author, "Citadel");
        for (i=1; i<argc; ++i) {
                if (!strncasecmp(argv[i], "-r", 2)) {
                        strncpy(target_room, &argv[i][2], sizeof(target_room));
                        target_room[sizeof(target_room)-1] = 0;
+               }
+               else if (!strncasecmp(argv[i], "-a", 2)) {
+                       strncpy(author, &argv[i][2], sizeof(author));
+                       author[sizeof(author)-1] = 0;
                } else {
-                       fprintf(stderr, "%s: usage: %s [-rTargetRoom]\n",
+                       fprintf(stderr, "%s: usage: %s "
+                                       "[-rTargetRoom] [-aAuthor]\n",
                                argv[0], argv[0]);
                        exit(1);
                }
@@ -82,7 +89,7 @@ int main(int argc, char **argv)
        }
 
        /* Generate a message from stdin */
-       make_message(tempfp, target_room);
+       make_message(tempfp, target_room, author);
 
        /* Copy it to a new temp file in the spool directory */
        rewind(tempfp);
index a831b7c3ef0a4107750b98a3dfd90e648bcc1a7d..575a7e10e6491125af499dd3a424247f693e37aa 100644 (file)
@@ -283,7 +283,7 @@ void imap_command_loop(void) {
 char *Dynamic_Module_Init(void)
 {
        SYM_IMAP = CtdlGetDynamicSymbol();
-       CtdlRegisterServiceHook(-1,     /* FIXME put in config setup */
+       CtdlRegisterServiceHook(143,    /* FIXME put in config setup */
                                NULL,
                                imap_greeting,
                                imap_command_loop);
index 7705768ec44efa9ee5009c825cc6fc53a271ffcc..16e2751566f07447f3978bd1628b86e4ecc0f479 100644 (file)
@@ -849,8 +849,8 @@ int main(int argc, char *argv[])
        /*
         * Default port numbers for various services
         */
-       if (config.c_pop3_port == 0) config.c_pop3_port = (-1);
-       if (config.c_smtp_port == 0) config.c_smtp_port = (-1);
+       if (config.c_pop3_port == 0) config.c_pop3_port = 110;
+       if (config.c_smtp_port == 0) config.c_smtp_port = 25;
 
 
        /* Go through a series of dialogs prompting for config info */