[prev in list] [next in list] [prev in thread] [next in thread] 

List:       listar-announce
Subject:    [Listar] Important SMTP.C patch (against 0.120/0.121)
From:       JT <jtraub () dragoncat ! net>
Date:       1999-03-16 16:58:53
[Download RAW message or body]


The attached patch fixes a small bug in the smtp.c code which caused it to
take 30 seconds extra *per connection to the mail server* due to a small
bug in the way multi-line connection messages were handled.  To apply this
patch, save it to your machine into a file (smtp-patch) and then cd to
your listar installation's src directory.
Then type
patch < /path/to/smtp-patch

remake, and all should be well.  If you are using an RPM or deb
installation, you can either install the source and rebuild or (for RPMs)
pick up the snapshot that will get built this evening.

--JT

-- 
[-------------------------------------------------------------------------]
[ Practice random kindness and senseless acts of beauty.                  ]
[ It's hard to seize the day when you must first grapple with the morning ]
[-------------------------------------------------------------------------]


-- Listar MIME Decryption --------------
-- Name   : smtp.diff
-- Desc   : SMTP Patch
-- Decode : BASE64

Index: smtp.c
===================================================================
RCS file: /var/cvs/listar/src/smtp.c,v
retrieving revision 1.8
diff -c -r1.8 smtp.c
*** smtp.c	1999/03/15 02:24:07	1.8
--- smtp.c	1999/03/16 16:51:25
***************
*** 44,49 ****
--- 44,50 ----
      char dbg_version[256];
      char buf[BIG_BUF];
      char testme[32];
+     int read_data = 0;
  
      if(my_socket != -1)
          sock_close(my_socket);
***************
*** 53,65 ****
      if (sock_open(cfg_mailserver, 25, &my_socket))
          return 0;
  
-     if (sock_readline(my_socket,&buf[0],BIG_BUF) == 0)
-         return 0;
- 
      while(sock_readline(my_socket,&buf[0],BIG_BUF) != 0) {
          int val;
          char ch;
  
          log_printf(9,"Server sent: %s\n", buf);
  
          sscanf(buf, "%d%c%s %s", &val, &ch, &dbg_hostname[0], &dbg_version[0]);
--- 54,64 ----
      if (sock_open(cfg_mailserver, 25, &my_socket))
          return 0;
  
      while(sock_readline(my_socket,&buf[0],BIG_BUF) != 0) {
          int val;
          char ch;
  
+         read_data = 1;
          log_printf(9,"Server sent: %s\n", buf);
  
          sscanf(buf, "%d%c%s %s", &val, &ch, &dbg_hostname[0], &dbg_version[0]);
***************
*** 71,76 ****
--- 70,77 ----
              break;
          }
      }
+     if(!read_data)
+         return 0;
  
      sock_printf(my_socket, "EHLO %s\n", hostname);
      if(sock_readline(my_socket, buf, BIG_BUF) == 0)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic