|
From: <s-v...@us...> - 2014-01-15 20:46:56
|
Revision: 244
http://sourceforge.net/p/turnserver/code/244
Author: s-vincent
Date: 2014-01-15 20:46:52 +0000 (Wed, 15 Jan 2014)
Log Message:
-----------
Fixes calls of list_head_add/remove (intervert arguments since refactoring).
Modified Paths:
--------------
trunk/src/account.c
trunk/src/allocation.c
trunk/src/conf.c
trunk/src/mod_tmpuser.c
trunk/src/turnserver.c
Modified: trunk/src/account.c
===================================================================
--- trunk/src/account.c 2014-01-15 20:28:10 UTC (rev 243)
+++ trunk/src/account.c 2014-01-15 20:46:52 UTC (rev 244)
@@ -72,7 +72,6 @@
ret->state = state;
ret->allocations = 0;
ret->is_tmp = 0;
- list_head_init(&ret->list);
turn_calculate_authentication_key(username, realm, password, ret->key,
sizeof(ret->key));
@@ -130,7 +129,7 @@
void account_list_add(struct list_head* list, struct account_desc* desc)
{
- list_head_add(&desc->list, list);
+ list_head_add(list, &desc->list);
}
void account_list_remove(struct list_head* list, struct account_desc* desc)
Modified: trunk/src/allocation.c
===================================================================
--- trunk/src/allocation.c 2014-01-15 20:28:10 UTC (rev 243)
+++ trunk/src/allocation.c 2014-01-15 20:46:52 UTC (rev 244)
@@ -341,7 +341,7 @@
allocation_permission_set_timer(ret, lifetime);
/* add to the list */
- list_head_add(&ret->list, &desc->peers_permissions);
+ list_head_add(&desc->peers_permissions, &ret->list);
list_head_init(&ret->list2);
return 0;
}
@@ -421,7 +421,7 @@
allocation_channel_set_timer(ret, lifetime);
/* add to the list */
- list_head_add(&ret->list, &desc->peers_channels);
+ list_head_add(&desc->peers_channels, &ret->list);
list_head_init(&ret->list2);
return 0;
}
@@ -481,7 +481,7 @@
void allocation_list_add(struct list_head* list, struct allocation_desc* desc)
{
- list_head_add_tail(&desc->list, list);
+ list_head_add_tail(list, &desc->list);
}
void allocation_list_remove(struct list_head* list,
@@ -642,7 +642,7 @@
allocation_tcp_relay_set_timer(ret, timeout);
/* add to the list */
- list_head_add(&ret->list, &desc->tcp_relays);
+ list_head_add(&desc->tcp_relays, &ret->list);
list_head_init(&ret->list2);
return 0;
}
@@ -806,7 +806,7 @@
void allocation_token_list_add(struct list_head* list,
struct allocation_token* token)
{
- list_head_add(&token->list, list);
+ list_head_add(list, &token->list);
}
void allocation_token_list_remove(struct list_head* list,
Modified: trunk/src/conf.c
===================================================================
--- trunk/src/conf.c 2014-01-15 20:28:10 UTC (rev 243)
+++ trunk/src/conf.c 2014-01-15 20:46:52 UTC (rev 244)
@@ -186,7 +186,6 @@
memset(denied, 0x00, sizeof(struct denied_address));
denied->mask = mask;
denied->port = port;
- list_head_init(&denied->list);
if(inet_pton(AF_INET, addr, denied->addr) != 1)
{
@@ -219,7 +218,7 @@
}
/* add to the list */
- list_head_add(&denied->list, denied_address_list);
+ list_head_add(denied_address_list, &denied->list);
}
return 0;
Modified: trunk/src/mod_tmpuser.c
===================================================================
--- trunk/src/mod_tmpuser.c 2014-01-15 20:28:10 UTC (rev 243)
+++ trunk/src/mod_tmpuser.c 2014-01-15 20:46:52 UTC (rev 244)
@@ -172,7 +172,7 @@
void tmpuser_add_tcp_client(struct socket_desc* desc)
{
struct list_head* l = (struct list_head*)&desc->list;
- list_head_add(l, &g_tmpuser.client_list);
+ list_head_add(&g_tmpuser.client_list, l);
}
void tmpuser_remove_tcp_client(struct socket_desc* desc)
Modified: trunk/src/turnserver.c
===================================================================
--- trunk/src/turnserver.c 2014-01-15 20:28:10 UTC (rev 243)
+++ trunk/src/turnserver.c 2014-01-15 20:46:52 UTC (rev 244)
@@ -265,7 +265,7 @@
/* add it to the expired list, the next loop will
* purge it
*/
- list_head_add(&desc->list2, &g_expired_allocation_list);
+ list_head_add(&g_expired_allocation_list, &desc->list2);
}
else if(signo == SIGRT_EXPIRE_PERMISSION)
{
@@ -278,7 +278,7 @@
debug(DBG_ATTR, "Permission expires: %p\n", desc);
/* add it to the expired list */
- list_head_add(&desc->list2, &g_expired_permission_list);
+ list_head_add(&g_expired_permission_list, &desc->list2);
}
else if(signo == SIGRT_EXPIRE_CHANNEL)
{
@@ -291,7 +291,7 @@
debug(DBG_ATTR, "Channel expires: %p\n", desc);
/* add it to the expired list */
- list_head_add(&desc->list2, &g_expired_channel_list);
+ list_head_add(&g_expired_channel_list, &desc->list2);
}
else if(signo == SIGRT_EXPIRE_TOKEN)
{
@@ -304,7 +304,7 @@
debug(DBG_ATTR, "Token expires: %p\n", desc);
/* add it to the expired list */
- list_head_add(&desc->list2, &g_expired_token_list);
+ list_head_add(&g_expired_token_list, &desc->list2);
}
else if(signo == SIGRT_EXPIRE_TCP_RELAY)
{
@@ -317,7 +317,7 @@
/* remove relay from list */
debug(DBG_ATTR, "TCP relay expires: %p\n", desc);
- list_head_add(&desc->list2, &g_expired_tcp_relay_list);
+ list_head_add(&g_expired_tcp_relay_list, &desc->list2);
}
}
@@ -4249,7 +4249,7 @@
sdesc->sock = rsock;
/* add it to the list */
- list_head_add(&sdesc->list, tcp_socket_list);
+ list_head_add(tcp_socket_list, &sdesc->list);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|