We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1051b3 commit 026a6c2Copy full SHA for 026a6c2
chap07/web_server2.c
@@ -138,7 +138,7 @@ void drop_client(struct client_info **client_list,
138
free(client);
139
return;
140
}
141
- p = &client->next;
+ p = &(*p)->next;
142
143
144
fprintf(stderr, "drop_client not found.\n");
@@ -311,7 +311,7 @@ int main() {
311
312
struct client_info *client = client_list;
313
while(client) {
314
- struct client_info *next = client;
+ struct client_info *next = client->next;
315
316
if (FD_ISSET(client->socket, &reads)) {
317
@@ -349,7 +349,7 @@ int main() {
349
serve_resource(&client_list, client, path);
350
351
352
- }
+ } //if (q)
353
354
355
0 commit comments