Sfoglia il codice sorgente

core: parser - wrapper function to parse str header name

Daniel-Constantin Mierla 5 anni fa
parent
commit
48d0953b5f
2 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  1. 6 0
      src/core/parser/parse_hname2.c
  2. 4 3
      src/core/parser/parse_hname2.h

+ 6 - 0
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);
+}
+

+ 4 - 3
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);