- Timestamp:
- Sep 26, 2016 7:57:54 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp/pjlib/src/pj/sock_uwp.cpp
r5298 r5439 389 389 concurrency::create_task(stream_sock->CancelIOAsync()).wait(); 390 390 } 391 if (datagram_sock ) {391 if (datagram_sock && has_pending_send) { 392 392 concurrency::create_task(datagram_sock->CancelIOAsync()).wait(); 393 393 } … … 440 440 int port; 441 441 442 try { 443 sockaddr_to_hostname_port(addr, host, &port); 444 if (pj_sockaddr_has_addr(addr)) { 445 if (sock_type == SOCKTYPE_DATAGRAM) 446 return datagram_sock->BindEndpointAsync(host, port.ToString()); 447 else 448 return listener_sock->BindEndpointAsync(host, port.ToString()); 449 } else /* if (pj_sockaddr_get_port(addr) != 0) */ { 450 if (sock_type == SOCKTYPE_DATAGRAM) 451 return datagram_sock->BindServiceNameAsync(port.ToString()); 452 else 453 return listener_sock->BindServiceNameAsync(port.ToString()); 454 } 455 } catch (Exception^ e) { 456 err = e->HResult; 442 sockaddr_to_hostname_port(addr, host, &port); 443 if (pj_sockaddr_has_addr(addr)) { 444 if (sock_type == SOCKTYPE_DATAGRAM) 445 return datagram_sock->BindEndpointAsync(host, port.ToString()); 446 else 447 return listener_sock->BindEndpointAsync(host, port.ToString()); 448 } else /* if (pj_sockaddr_get_port(addr) != 0) */ { 449 if (sock_type == SOCKTYPE_DATAGRAM) 450 return datagram_sock->BindServiceNameAsync(port.ToString()); 451 else 452 return listener_sock->BindServiceNameAsync(port.ToString()); 457 453 } 458 454 }).then([this, &err](concurrency::task<void> t)
Note: See TracChangeset
for help on using the changeset viewer.