diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-12 15:04:09 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-12 15:04:09 +0000 |
commit | f3fe35899c9749e4eb8000ccebb8e1348def28d6 (patch) | |
tree | 69c72f6bf4b73035ac528e15e625d466059c3d95 | |
parent | 9262f78cb77ed82db9b96c577a6701100f3a4919 (diff) | |
download | mailfromd-f3fe35899c9749e4eb8000ccebb8e1348def28d6.tar.gz mailfromd-f3fe35899c9749e4eb8000ccebb8e1348def28d6.tar.bz2 |
Fix header deletion.
* src/gram.y (DELETE string): Initialize hdr.value.
* src/drivers.c (code_type_header): Value can be NULL.
git-svn-id: file:///svnroot/mailfromd/branches/gmach@1556 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/drivers.c | 9 | ||||
-rw-r--r-- | src/gram.y | 1 |
3 files changed, 11 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2008-01-12 Sergey Poznyakoff <gray@gnu.org.ua> + * src/gram.y (DELETE string): Initialize hdr.value. + * src/drivers.c (code_type_header): Value can be NULL. + * pmult/pmult.c: Implement most of the SMTP functionality. * src/mailfromd.h, lib/libmf.h (dict_init, dict_install) diff --git a/src/drivers.c b/src/drivers.c index 278dbb60..56290b80 100644 --- a/src/drivers.c +++ b/src/drivers.c @@ -1,5 +1,5 @@ /* This file is part of mailfromd. - Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff + Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -977,7 +977,12 @@ void code_type_header(NODE *node, struct locus **old_locus) { MARK_LOCUS(); - code_node(node->v.hdr.value); + if (node->v.hdr.value) + code_node(node->v.hdr.value); + else { + code_op(opcode_push); + code_immediate(0); + } code_op(opcode_header); code_immediate((void*)node->v.hdr.opcode); code_immediate((void*)node->v.hdr.name->off); @@ -860,6 +860,7 @@ header_action: $$ = alloc_node(node_type_header, &$1); $$->v.hdr.opcode = header_delete; $$->v.hdr.name = $2; + $$->v.hdr.value = NULL; } ; |