From 48d0953b5fd1f6fed97ce6b016f05860b25cd97f Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 6 Oct 2020 12:18:26 +0200 Subject: [PATCH] core: parser - wrapper function to parse str header name --- src/core/parser/parse_hname2.c | 6 ++++++ src/core/parser/parse_hname2.h | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/parser/parse_hname2.c b/src/core/parser/parse_hname2.c index 598008214a9..ab56fa4ea58 100644 --- a/src/core/parser/parse_hname2.c +++ b/src/core/parser/parse_hname2.c @@ -309,3 +309,9 @@ char* parse_hname2_short(char* const begin, const char* const end, struct hdr_fi { return parse_sip_header_name(begin, end, hdr, 0); } + +char* parse_hname2_str (str* const hbuf, hdr_field_t* const hdr) +{ + return parse_sip_header_name(hbuf->s, hbuf->s + hbuf->len, hdr, 1); +} + diff --git a/src/core/parser/parse_hname2.h b/src/core/parser/parse_hname2.h index 9eef0bb53e4..2c864857d6d 100644 --- a/src/core/parser/parse_hname2.h +++ b/src/core/parser/parse_hname2.h @@ -15,13 +15,13 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /*! \file - * \brief Parser :: Fast 32-bit Header Field Name Parser + * \brief Parser :: Fast Header Field Name Parser * * \ingroup parser */ @@ -37,6 +37,7 @@ */ char* parse_hname2(char* const begin, const char* const end, struct hdr_field* const hdr); char* parse_hname2_short(char* const begin, const char* const end, struct hdr_field* const hdr); +char* parse_hname2_str (str* const hbuf, hdr_field_t* const hdr); int ksr_hname_init_index(void); int ksr_hname_init_config(void);