projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0013736
)
Fix misuse of Client_iterate() in Client_voiceMsg().
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 1 Jan 2018 18:26:37 +0000
(19:26 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 1 Jan 2018 18:26:37 +0000
(19:26 +0100)
To start iteration, we need to pass NULL to Client_iterate().
This probably only worked before because the variable got initialized
to NULL implicitly.
src/client.c
patch
|
blob
|
history
diff --git
a/src/client.c
b/src/client.c
index 5b76b7e3c6d1a3bd1a1f4f3df101e012a2f44203..856c8645e7b647071a9af057d64ff7fe24cd64ac 100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-983,7
+983,7
@@
int Client_voiceMsg(client_t *client, uint8_t *data, int len)
}
/* Sessions */
for (i = 0; i < TARGET_MAX_SESSIONS && vt->sessions[i] != -1; i++) {
- client_t *c;
+ client_t *c
= NULL
;
buffer[0] = (uint8_t) (type | 2);
Log_debug("Whisper session %d", vt->sessions[i]);
while (Client_iterate(&c) != NULL) {