belle_sdp: many places were not handling unsigned correctly...

parent 76281d0a
......@@ -135,8 +135,8 @@ origin returns [belle_sdp_origin_t* ret]
scope { belle_sdp_origin_t* current; }
@init {$origin::current = belle_sdp_origin_new(); $ret=$origin::current; }
: {IS_TOKEN(o)}?alpha_num EQUAL username {belle_sdp_origin_set_username($origin::current,(const char*)$username.text->chars);}
SPACE sess_id {if ($sess_id.text->chars) belle_sdp_origin_set_session_id($origin::current,atol((const char*)$sess_id.text->chars));}
SPACE sess_version {if ($sess_version.text->chars) belle_sdp_origin_set_session_version($origin::current,atol((const char*)$sess_version.text->chars));}
SPACE sess_id {if ($sess_id.text->chars) belle_sdp_origin_set_session_id($origin::current,strtoul((const char*)$sess_id.text->chars,NULL,10));}
SPACE sess_version {if ($sess_version.text->chars) belle_sdp_origin_set_session_version($origin::current,strtoul((const char*)$sess_version.text->chars,NULL,10));}
SPACE nettype {belle_sdp_origin_set_network_type($origin::current,(const char*)$nettype.text->chars);}
SPACE addrtype {belle_sdp_origin_set_address_type($origin::current,(const char*)$addrtype.text->chars);}
SPACE addr {belle_sdp_origin_set_address($origin::current,(const char*)$addr.text->chars);} ;
......
......@@ -417,8 +417,8 @@ static void test_simple_session_description(void) {
CU_ASSERT_STRING_EQUAL(belle_sdp_origin_get_address(l_origin),"192.168.0.18")
CU_ASSERT_STRING_EQUAL(belle_sdp_origin_get_address_type(l_origin),"IP4")
CU_ASSERT_STRING_EQUAL(belle_sdp_origin_get_network_type(l_origin),"IN")
BC_ASSERT_EQUAL_WITH_TYPE(belle_sdp_origin_get_session_id(l_origin), 2463217870, unsigned, "%u");
BC_ASSERT_EQUAL_WITH_TYPE(belle_sdp_origin_get_session_version(l_origin), 2463217870, unsigned, "%u");
BC_ASSERT_EQUAL_WITH_TYPE(belle_sdp_origin_get_session_id(l_origin), 2463217870U, unsigned, "%u");
BC_ASSERT_EQUAL_WITH_TYPE(belle_sdp_origin_get_session_version(l_origin), 2463217870U, unsigned, "%u");
CU_ASSERT_PTR_NOT_NULL(belle_sdp_session_description_get_session_name(l_session_description));
CU_ASSERT_STRING_EQUAL(belle_sdp_session_name_get_value(belle_sdp_session_description_get_session_name(l_session_description)),"Talk");
......
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