Commit 3f55bf2f authored by jehan's avatar jehan
Browse files

remove traces of raw message when shorter than 50 bytes to avoid server keep...

remove traces of raw message when shorter than 50 bytes to avoid server keep alives to polute traces
parent 7b2faa46
......@@ -360,7 +360,8 @@ int belle_sip_channel_process_data(belle_sip_channel_t *obj,unsigned int revents
obj->input_stream.write_ptr+=num;
/*first null terminate the read buff*/
*obj->input_stream.write_ptr='\0';
belle_sip_message("channel [%p]: received [%i] new bytes from [%s:%i]:\n%s",obj,num,obj->peer_name,obj->peer_port,begin);
if (num >50) /*to avoid tracing server based keep alives*/
belle_sip_message("channel [%p]: received [%i] new bytes from [%s:%i]:\n%s",obj,num,obj->peer_name,obj->peer_port,begin);
belle_sip_channel_parse_stream(obj);
if (obj->incoming_messages)
BELLE_SIP_INVOKE_LISTENERS_ARG1_ARG2(obj->listeners,belle_sip_channel_listener_t,on_event,obj,BELLE_SIP_EVENT_READ/*always a read event*/);
......
......@@ -24,7 +24,7 @@
static void testSIMPLEURI(void) {
belle_sip_uri_t* L_tmp;
belle_sip_uri_t* L_uri = belle_sip_uri_parse("sip:titi.com");
belle_sip_uri_t* L_uri = belle_sip_uri_parse("sip:sip.titi.com");
char* l_raw_uri = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_uri));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri));
L_tmp = belle_sip_uri_parse(l_raw_uri);
......@@ -33,7 +33,7 @@ static void testSIMPLEURI(void) {
belle_sip_free(l_raw_uri);
CU_ASSERT_PTR_NULL(belle_sip_uri_get_user(L_uri));
CU_ASSERT_STRING_EQUAL(belle_sip_uri_get_host(L_uri), "titi.com");
CU_ASSERT_STRING_EQUAL(belle_sip_uri_get_host(L_uri), "sip.titi.com");
CU_ASSERT_PTR_NULL(belle_sip_uri_get_transport_param(L_uri));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_uri));
}
......
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