diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-16 17:13:09 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-02-16 17:13:09 +0400 |
commit | 632e9a8987961769fe478b0f60251f4fda5ca732 (patch) | |
tree | 514a3aed6f40252169ffa4557066091b4105aa3b /src/fstring.c | |
parent | bf2371d272bac279db965abeca2c5979155d8cc3 (diff) | |
download | rspamd-632e9a8987961769fe478b0f60251f4fda5ca732.tar.gz rspamd-632e9a8987961769fe478b0f60251f4fda5ca732.zip |
Add support of buffered IO reset to support persistent connections.
Diffstat (limited to 'src/fstring.c')
-rw-r--r-- | src/fstring.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fstring.c b/src/fstring.c index c2d48603b..b3050d8c2 100644 --- a/src/fstring.c +++ b/src/fstring.c @@ -273,6 +273,21 @@ fstralloc (memory_pool_t * pool, size_t len) } /* + * Allocate memory for f_str_t from temporary pool + */ +f_str_t * +fstralloc_tmp (memory_pool_t * pool, size_t len) +{ + f_str_t *res = memory_pool_alloc_tmp (pool, sizeof (f_str_t)); + + res->begin = memory_pool_alloc_tmp (pool, len); + + res->size = len; + res->len = 0; + return res; +} + +/* * Truncate string to its len */ f_str_t * |