Browse code

core: parser - wrapper function to parse str header name

Daniel-Constantin Mierla authored on 06/10/2020 10:18:26
Showing 2 changed files
... ...
@@ -309,3 +309,9 @@ char* parse_hname2_short(char* const begin, const char* const end, struct hdr_fi
309 309
 {
310 310
 	return parse_sip_header_name(begin, end, hdr, 0);
311 311
 }
312
+
313
+char* parse_hname2_str (str* const hbuf, hdr_field_t* const hdr)
314
+{
315
+	return parse_sip_header_name(hbuf->s, hbuf->s + hbuf->len, hdr, 1);
316
+}
317
+
... ...
@@ -15,13 +15,13 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 17
  *
18
- * You should have received a copy of the GNU General Public License 
19
- * along with this program; if not, write to the Free Software 
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  */
22 22
 
23 23
 /*! \file
24
- * \brief Parser :: Fast 32-bit Header Field Name Parser
24
+ * \brief Parser :: Fast Header Field Name Parser
25 25
  *
26 26
  * \ingroup parser
27 27
  */
... ...
@@ -37,6 +37,7 @@
37 37
  */
38 38
 char* parse_hname2(char* const begin, const char* const end, struct hdr_field* const hdr);
39 39
 char* parse_hname2_short(char* const begin, const char* const end, struct hdr_field* const hdr);
40
+char* parse_hname2_str (str* const hbuf, hdr_field_t* const hdr);
40 41
 
41 42
 int ksr_hname_init_index(void);
42 43
 int ksr_hname_init_config(void);