Commit 8abc3974 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

agent: Tidy up a few variable references

This simplifies the code a little. No functional changes.
parent ee109a91
...@@ -1718,20 +1718,19 @@ pseudo_tcp_socket_write_packet (PseudoTcpSocket *psocket, ...@@ -1718,20 +1718,19 @@ pseudo_tcp_socket_write_packet (PseudoTcpSocket *psocket,
NiceAddress *addr; NiceAddress *addr;
sock = component->selected_pair.local->sockptr; sock = component->selected_pair.local->sockptr;
addr = &component->selected_pair.remote->addr;
if (nice_debug_is_enabled ()) { if (nice_debug_is_enabled ()) {
gchar tmpbuf[INET6_ADDRSTRLEN]; gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&component->selected_pair.remote->addr, tmpbuf); nice_address_to_string (addr, tmpbuf);
nice_debug ( nice_debug (
"Agent %p : s%d:%d: sending %d bytes on socket %p (FD %d) to [%s]:%d", "Agent %p : s%d:%d: sending %d bytes on socket %p (FD %d) to [%s]:%d",
component->agent, component->stream->id, component->id, len, component->agent, component->stream->id, component->id, len,
sock->fileno, g_socket_get_fd (sock->fileno), tmpbuf, sock->fileno, g_socket_get_fd (sock->fileno), tmpbuf,
nice_address_get_port (&component->selected_pair.remote->addr)); nice_address_get_port (addr));
} }
addr = &component->selected_pair.remote->addr;
if (nice_socket_send (sock, addr, len, buffer)) if (nice_socket_send (sock, addr, len, buffer))
return WR_SUCCESS; return WR_SUCCESS;
} else { } else {
......
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