You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by so...@apache.org on 2005/09/20 03:00:35 UTC

svn commit: r290323 - /httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c

Author: soc-rian
Date: Mon Sep 19 18:00:32 2005
New Revision: 290323

URL: http://svn.apache.org/viewcvs?rev=290323&view=rev
Log:
Unnecessary extra vector.

Modified:
    httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c

Modified: httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c?rev=290323&r1=290322&r2=290323&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c (original)
+++ httpd/mod_smtpd/trunk/modules/queue/smtp/mod_smtpd_queue_smtp.c Mon Sep 19 18:00:32 2005
@@ -286,21 +286,18 @@
         /* identify the sender. */
 
         {
-            struct iovec vec[4];
-
-            vec[0].iov_base = "MAIL FROM:";
-            vec[0].iov_len = 10;
+            struct iovec vec[3];
 
-            vec[1].iov_base = "<";
-            vec[1].iov_len = 1;
+            vec[0].iov_base = "MAIL FROM:<";
+            vec[0].iov_len = 11;
 
-            vec[2].iov_base = scr->transaction->mail_from;
-            vec[2].iov_len = strlen(scr->transaction->mail_from);
+            vec[1].iov_base = scr->transaction->mail_from;
+            vec[1].iov_len = strlen(scr->transaction->mail_from);
 
-            vec[3].iov_base = ">\r\n";
-            vec[3].iov_len = 3;
+            vec[2].iov_base = ">\r\n";
+            vec[2].iov_len = 3;
 
-            apr_err = apr_socket_sendv(sock, vec, 4, &nbytes);
+            apr_err = apr_socket_sendv(sock, vec, 3, &nbytes);
             if (apr_err)
                 break;
         }
@@ -326,19 +323,16 @@
 
             char *to = APR_ARRAY_IDX(scr->transaction->rcpt_to, i, char *);
 
-            vec[0].iov_base = "RCPT TO:";
-            vec[0].iov_len = 8;
-
-            vec[1].iov_base = "<";
-            vec[1].iov_len = 1;
+            vec[0].iov_base = "RCPT TO:<";
+            vec[0].iov_len = 9;
 
-            vec[2].iov_base = to;
-            vec[2].iov_len = strlen(to);
+            vec[1].iov_base = to;
+            vec[1].iov_len = strlen(to);
 
-            vec[3].iov_base = ">\r\n";
-            vec[3].iov_len = 3;
+            vec[2].iov_base = ">\r\n";
+            vec[2].iov_len = 3;
 
-            apr_err = apr_socket_sendv(sock, vec, 4, &nbytes);
+            apr_err = apr_socket_sendv(sock, vec, 3, &nbytes);
             if (apr_err)
                 break;