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

Annotation of /rpms/qpsmtpd/sme9/0028-Shorten-clarify-Connection-and-Transaction-notes.patch

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


Revision 1.1 - (hide annotations) (download)
Sat Feb 2 00:59:44 2013 UTC (11 years, 9 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-14_el6_sme, qpsmtpd-0_84-16_el6_sme, qpsmtpd-0_84-12_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-2_el6_sme, qpsmtpd-0_84-13_el6_sme, qpsmtpd-0_84-6_el6_sme, qpsmtpd-0_84-18_el6_sme, qpsmtpd-0_84-9_el6_sme, qpsmtpd-0_84-4_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_84-15_el6_sme, qpsmtpd-0_96-4_el6_sme, qpsmtpd-0_96-3_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_84-17_el6_sme, qpsmtpd-0_84-7_el6_sme, qpsmtpd-0_96-5_el6_sme, qpsmtpd-0_84-10_el6_sme, qpsmtpd-0_84-8_el6_sme, qpsmtpd-0_96-1_el6_sme, qpsmtpd-0_84-5_el6_sme, qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_84-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
* Fri Feb 1 2013 Shad L. Lords <slords@mail.com> 0.84-4.sme
- Update spec so building on rhel6 works [SME: 7263]

1 slords 1.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