mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
Fix GNetworkAddress skipping addresses when enumerating
g_network_address_address_enumerator_next_finish takes the first item of the address list and moves the pointer to the next one, so we shouldn't do the same in g_network_address_address_enumerator_next_async function Fixes bug #593941
This commit is contained in:
parent
cdd04f36ca
commit
8667317766
@ -543,7 +543,6 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator *enum
|
||||
GNetworkAddressAddressEnumerator *addr_enum =
|
||||
G_NETWORK_ADDRESS_ADDRESS_ENUMERATOR (enumerator);
|
||||
GSimpleAsyncResult *simple;
|
||||
GSocketAddress *sockaddr;
|
||||
|
||||
simple = g_simple_async_result_new (G_OBJECT (enumerator),
|
||||
callback, user_data,
|
||||
@ -561,10 +560,6 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator *enum
|
||||
}
|
||||
else
|
||||
{
|
||||
sockaddr = g_network_address_address_enumerator_next (enumerator, NULL, NULL);
|
||||
if (sockaddr)
|
||||
g_simple_async_result_set_op_res_gpointer (simple, sockaddr, g_object_unref);
|
||||
|
||||
g_simple_async_result_complete_in_idle (simple);
|
||||
g_object_unref (simple);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user