Commit 2b67687e authored by jehan's avatar jehan

finalize fast parser for header_headdress object

parent f148f4e1
......@@ -59,6 +59,12 @@ BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_create2(con
BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_parse (const char* address) ;
/*
same as belle_sip_header_address_parse but with less syntax checking
*/
BELLESIP_EXPORT belle_sip_header_address_t* belle_sip_header_address_fast_parse (const char* address) ;
/**
* returns a sip uri. A header address cannot have both a sip uri and an absolute uri.
*/
......
......@@ -313,6 +313,13 @@ belle_sip_header_address_t* belle_sip_header_address_create2(const char* display
return address;
}
/*fast header address implemenation*/
typedef belle_sip_header_address_t belle_sip_fast_header_address_t;
#define belle_sip_fast_header_address_parse belle_sip_header_address_fast_parse
BELLE_SIP_PARSE(fast_header_address)
/******************************
* Extension header inherits from header
*
......
......@@ -741,7 +741,7 @@ static void test_address_with_error_header(void) {
static void test_address_header(void) {
belle_sip_uri_t* L_uri;
char* L_raw;
belle_sip_header_address_t* laddress = belle_sip_header_address_parse("\"toto\" <sip:liblinphone_tester@81.56.11.2:5060>");
belle_sip_header_address_t* laddress = belle_sip_header_address_fast_parse("\"toto\" <sip:liblinphone_tester@81.56.11.2:5060>");
BC_ASSERT_PTR_NOT_NULL(laddress);
L_raw = belle_sip_object_to_string(BELLE_SIP_OBJECT(laddress));
BC_ASSERT_PTR_NOT_NULL(L_raw);
......@@ -775,7 +775,7 @@ static void test_address_header(void) {
static void test_address_header_with_tel_uri(void) {
belle_generic_uri_t* L_uri;
char* L_raw;
belle_sip_header_address_t* laddress = belle_sip_header_address_parse("\"toto\" <tel:123456>");
belle_sip_header_address_t* laddress = belle_sip_header_address_fast_parse("\"toto\" <tel:123456>");
BC_ASSERT_PTR_NOT_NULL(laddress);
L_raw = belle_sip_object_to_string(BELLE_SIP_OBJECT(laddress));
BC_ASSERT_PTR_NOT_NULL(L_raw);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment