Read socket state in g_socket_get_local/remote_address

Previously we saved the location in various places which is unnecessary
and sometimes even wrong. For instance, we saved the address we bound to
which may not have the final port set.
This commit is contained in:
Alexander Larsson
2009-05-19 10:40:27 +02:00
parent f8cd1c5304
commit 69130db81a
3 changed files with 31 additions and 60 deletions

View File

@@ -191,6 +191,7 @@ main (int argc,
g_print ("got a new connection from %s\n",
socket_address_to_string (address));
g_object_unref (address);
recv_socket = new_socket;
}