Changeset 143
- Timestamp:
- 07/05/04 23:34:44 (9 years ago)
- Location:
- trunk/wifidog
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
src/client_list.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/ChangeLog
r141 r143 1 1 # $Header$ 2 2004-07-05 Philippe April <papril777@yahoo.com> 3 * Fixed an endless loop in client_list_delete 4 2 5 2004-06-10 Alexandre Carmel-Veilleux <acv@acv.ca> 3 6 * Added debugging to libhttpd so that httpdGetConnection() traces -
trunk/wifidog/src/client_list.c
r136 r143 212 212 ptr = firstclient; 213 213 214 if (ptr == client) { 214 if (ptr == NULL) { 215 debug(LOG_ERR, "Node list empty!"); 216 } else if (ptr == client) { 215 217 firstclient = ptr->next; 216 218 _client_list_free_node(client); 217 219 } else { 218 while (ptr->next != NULL && ptr != client) { 219 if (ptr->next == client) { 220 ptr->next = client->next; 221 _client_list_free_node(client); 222 } 220 /* Loop forward until we reach our point in the list. */ 221 while (ptr->next != NULL && ptr->next != client) { 222 ptr = ptr->next; 223 223 } 224 } 225 } 226 227 224 /* If we reach the end before finding out element, complain. */ 225 if (ptr->next == NULL) { 226 debug(LOG_ERR, "Node to delete could not be found."); 227 /* Free element. */ 228 } else { 229 ptr->next = client->next; 230 _client_list_free_node(client); 231 } 232 } 233 }
