projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
336f285
)
Corrected a bug that causes segfaults if UDP packets are received when no client...
author
fatbob313
<martin@fatbob.nu>
Thu, 26 Nov 2009 20:17:13 +0000
(20:17 +0000)
committer
fatbob313
<martin@fatbob.nu>
Thu, 26 Nov 2009 20:17:13 +0000
(20:17 +0000)
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index 1994364c18153e4b708b567776888af229034aa4..74633613b744401636c10eee2c7a3b535d5f5bac 100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-377,8
+377,11
@@
int Client_send_message(client_t *client, message_t *msg)
client_t *Client_iterate(client_t **client_itr)
{
client_t *c = *client_itr;
+
+ if (list_empty(&clients))
+ return NULL;
- if (c == NULL
&& !list_empty(&clients)
) {
+ if (c == NULL) {
c = list_get_entry(list_get_first(&clients), client_t, node);
} else {
if (list_get_next(&c->node) == &clients)