aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-09-14 01:20:53 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-09-14 02:18:36 +0200
commitd586881f81e74f7c22a2d11094f38634933a558a (patch)
treebae7855d74b3a128e37dd5cb3f885440298f4723 /interimap
parent35ab0d8661b6808a9132bde20eefcf07f1486093 (diff)
Pass literals by reference to save memory.
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap4
1 files changed, 2 insertions, 2 deletions
diff --git a/interimap b/interimap
index 1535739..e7cd6d5 100755
--- a/interimap
+++ b/interimap
@@ -971,8 +971,8 @@ sub sync_known_messages($$) {
sub callback_new_message($$$$;$$$) {
my ($idx, $mailbox, $name, $mail, $UIDs, $buff, $bufflen) = @_;
- my $length = defined $mail->{RFC822} ? length($mail->{RFC822})
- : defined $mail->{BINARY} ? length($mail->{BINARY})
+ my $length = defined $mail->{RFC822} ? length(${$mail->{RFC822}})
+ : defined $mail->{BINARY} ? length(${$mail->{BINARY}})
: return; # not for us
if ($length == 0) {
msg("$name($mailbox)", "WARNING: Ignoring new 0-length message (UID $mail->{UID})");