transport: Keep a list o all existent transports

This commit is contained in:
João Paulo Rechi Vita 2013-01-11 17:25:28 -03:00 committed by Luiz Augusto von Dentz
parent be8954bdc6
commit a17e2e7087

View File

@ -107,6 +107,8 @@ struct media_transport {
void *data;
};
static GSList *transports = NULL;
static const char *state2str(transport_state_t state)
{
switch (state) {
@ -703,6 +705,8 @@ static void media_transport_free(void *data)
{
struct media_transport *transport = data;
transports = g_slist_remove(transports, transport);
if (transport->owner)
media_transport_remove_owner(transport);
@ -818,6 +822,8 @@ struct media_transport *media_transport_create(struct media_endpoint *endpoint,
goto fail;
}
transports = g_slist_append(transports, transport);
return transport;
fail: