/[smeserver]/rpms/qpsmtpd/sme8/0028-Shorten-clarify-Connection-and-Transaction-notes.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme8/0028-Shorten-clarify-Connection-and-Transaction-notes.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Nov 14 20:50:20 2010 UTC (13 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-3_el5_sme, qpsmtpd-0_84-6_el5_sme, qpsmtpd-0_84-2_el5_sme, qpsmtpd-0_84-5_el5_sme, qpsmtpd-0_84-8_el5_sme, qpsmtpd-0_84-9_el5_sme, qpsmtpd-0_84-4_el5_sme, qpsmtpd-0_84-7_el5_sme, HEAD
* Sun Nov 14 2010 <slords@mail.com> 0.84-2.sme
- Sync with upstream git repo.
- Fix require_resolvable_fromhost doesn't work [SME: 6369]
- Fix TLS security defaults [SME: 6366]
- Fix fatal errors when mail has no headers [SME: 6345]

1 From 96aa5ba171be75dbd25c44de813e74eb4e3d08b5 Mon Sep 17 00:00:00 2001
2 From: Jared Johnson <jaredj@jdjlaptop.(none)>
3 Date: Fri, 20 Feb 2009 21:22:28 +0800
4 Subject: Shorten/clarify Connection and Transaction notes()
5
6 Update Qpsmtpd::Connection::notes() and Qpsmtpd::Transaction::notes()
7 with clearer, more brief syntax. A previous patch used seemingly better
8 syntax, but did not evaluate the size of @_ in order to distinguish
9 between a call to notes('arg1',undef) and notes('arg1'). This corrects
10 this issue, and adds a comment to that effect.
11 ---
12 lib/Qpsmtpd/Connection.pm | 8 ++++----
13 lib/Qpsmtpd/Transaction.pm | 9 ++++-----
14 2 files changed, 8 insertions(+), 9 deletions(-)
15
16 diff --git a/lib/Qpsmtpd/Connection.pm b/lib/Qpsmtpd/Connection.pm
17 index 22ed704..99b7b38 100644
18 --- a/lib/Qpsmtpd/Connection.pm
19 +++ b/lib/Qpsmtpd/Connection.pm
20 @@ -108,10 +108,10 @@ sub hello_host {
21 }
22
23 sub notes {
24 - my $self = shift;
25 - my $key = shift;
26 - @_ and $self->{_notes}->{$key} = shift;
27 - $self->{_notes}->{$key};
28 + my ($self,$key) = (shift,shift);
29 + # Check for any additional arguments passed by the caller -- including undef
30 + return $self->{_notes}->{$key} unless @_;
31 + return $self->{_notes}->{$key} = shift;
32 }
33
34 sub reset {
35 diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm
36 index 18635ad..1dec547 100644
37 --- a/lib/Qpsmtpd/Transaction.pm
38 +++ b/lib/Qpsmtpd/Transaction.pm
39 @@ -61,11 +61,10 @@ sub header {
40 #}
41
42 sub notes {
43 - my $self = shift;
44 - my $key = shift;
45 - @_ and $self->{_notes}->{$key} = shift;
46 - #warn Data::Dumper->Dump([\$self->{_notes}], [qw(notes)]);
47 - $self->{_notes}->{$key};
48 + my ($self,$key) = (shift,shift);
49 + # Check for any additional arguments passed by the caller -- including undef
50 + return $self->{_notes}->{$key} unless @_;
51 + return $self->{_notes}->{$key} = shift;
52 }
53
54 sub set_body_start {
55 --
56 1.7.2.2
57

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed