Commit 58fc0fa8 authored by Dafydd Harries's avatar Dafydd Harries

destroy GSources created when attaching to mainloop

darcs-hash:20070313135920-c9803-d9cd52124b319f1ad80eab6d18366f333307ad7d.gz
parent 458059ca
......@@ -1293,6 +1293,7 @@ nice_agent_main_context_attach (
g_source_set_callback (source, (GSourceFunc) nice_agent_g_source_cb,
ctx, (GDestroyNotify) io_ctx_free);
g_source_attach (source, NULL);
candidate->source = source;
}
}
......
......@@ -26,6 +26,9 @@ nice_candidate_free (NiceCandidate *candidate)
if (candidate->sock.addr.addr_ipv4 != 0)
nice_udp_socket_close (&(candidate->sock));
if (candidate->source)
g_source_destroy (candidate->source);
g_slice_free (NiceCandidate, candidate);
}
......
......@@ -31,6 +31,7 @@ struct _NiceCandidate
NiceUDPSocket sock;
gchar username[128];
gchar password[128];
GSource *source;
};
......
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