Commit a3bbd5ce authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bad handling of ewouldblock errors on mac, fix ipv6 dns test not working...

fix bad handling of ewouldblock errors on mac, fix ipv6 dns test not working due to DNS server no more responding.
parent 1f3a8bc9
...@@ -933,9 +933,7 @@ static int send_buffer(belle_sip_channel_t *obj, const char *buffer, size_t size ...@@ -933,9 +933,7 @@ static int send_buffer(belle_sip_channel_t *obj, const char *buffer, size_t size
,obj->peer_name ,obj->peer_name
,obj->peer_port); ,obj->peer_port);
channel_set_state(obj,BELLE_SIP_CHANNEL_ERROR); channel_set_state(obj,BELLE_SIP_CHANNEL_ERROR);
}else{ }/*ewouldblock error has to be handled by caller*/
handle_ewouldblock(obj,buffer,size);
}
}else if (size==(size_t)ret){ }else if (size==(size_t)ret){
logbuf=make_logbuf(BELLE_SIP_LOG_MESSAGE, buffer,size); logbuf=make_logbuf(BELLE_SIP_LOG_MESSAGE, buffer,size);
belle_sip_message("channel [%p]: message sent to [%s://%s:%i], size: [%i] bytes\n%s" belle_sip_message("channel [%p]: message sent to [%s://%s:%i], size: [%i] bytes\n%s"
...@@ -1005,8 +1003,8 @@ static void _send_message(belle_sip_channel_t *obj){ ...@@ -1005,8 +1003,8 @@ static void _send_message(belle_sip_channel_t *obj){
} }
return; /*we prefer poll again to be sure we can write*/ return; /*we prefer poll again to be sure we can write*/
}else if (belle_sip_error_code_is_would_block(-sendret)) { }else if (belle_sip_error_code_is_would_block(-sendret)) {
belle_sip_error("channel [%p]: send ewouldblock error twice, should not happen", obj); /*we got an ewouldblock again. Nothing to do, we'll be called later in order to retry*/
return; return;
}else {/*error or disconnection case*/ }else {/*error or disconnection case*/
goto done; goto done;
} }
...@@ -1049,6 +1047,7 @@ static void _send_message(belle_sip_channel_t *obj){ ...@@ -1049,6 +1047,7 @@ static void _send_message(belle_sip_channel_t *obj){
break; break;
} }
}else if (belle_sip_error_code_is_would_block(-sendret)) { }else if (belle_sip_error_code_is_would_block(-sendret)) {
handle_ewouldblock(obj,buffer+off,len-off);
return; return;
}else {/*error or disconnection case*/ }else {/*error or disconnection case*/
goto done; goto done;
...@@ -1069,6 +1068,7 @@ static void _send_message(belle_sip_channel_t *obj){ ...@@ -1069,6 +1068,7 @@ static void _send_message(belle_sip_channel_t *obj){
break; break;
} }
}else if (belle_sip_error_code_is_would_block(-sendret)) { }else if (belle_sip_error_code_is_would_block(-sendret)) {
handle_ewouldblock(obj,buffer+off,chunk_len-off);
return; return;
}else {/*error or disconnection case*/ }else {/*error or disconnection case*/
goto done; goto done;
......
...@@ -475,7 +475,7 @@ static void ipv6_dns_server(void) { ...@@ -475,7 +475,7 @@ static void ipv6_dns_server(void) {
int timeout; int timeout;
endpoint_t *client; endpoint_t *client;
const char *nameservers[]={ const char *nameservers[]={
"2a01:e00::2", "2001:4860:4860::8888",
NULL NULL
}; };
......
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