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

Contents of /rpms/qpsmtpd/sme10/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 Feb 7 20:49:54 2016 UTC (8 years, 8 months ago) by stephdl
Branch: MAIN
CVS Tags: qpsmtpd-0_96-19_el7_sme, qpsmtpd-0_96-12_el7_sme, qpsmtpd-0_96-11_el7_sme, qpsmtpd-0_96-16_el7_sme, qpsmtpd-0_96-13_el7_sme, qpsmtpd-0_96-6_el7_sme, qpsmtpd-0_96-18_el7_sme, qpsmtpd-0_96-23_el7_sme, qpsmtpd-0_96-20_el7_sme, qpsmtpd-0_84-20_el7_sme, qpsmtpd-0_96-17_el7_sme, qpsmtpd-0_96-8_el7_sme, qpsmtpd-0_96-5_el7_sme, qpsmtpd-0_96-2_el7_sme, qpsmtpd-0_96-21_el7_sme, qpsmtpd-0_96-22_el7_sme, qpsmtpd-0_96-14_el7_sme, qpsmtpd-0_96-15_el7_sme, qpsmtpd-0_96-9_el7_sme, qpsmtpd-0_96-4_el7_sme, qpsmtpd-0_96-1_el7_sme, qpsmtpd-0_96-3_el7_sme, qpsmtpd-0_84-18_el7_sme, qpsmtpd-0_96-10_el7_sme, qpsmtpd-0_84-19_el7_sme, HEAD
Error occurred while calculating annotation data.
* Sun Feb 7 2016 stephane de labrusse <stephdl@de-labrusse.fr> 0.84-18.sme
- Build new rpm for sme10

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