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)
Pds_add_numval(pds, msg->sessionId);
Pds_add_numval(pds, msg->payload.speex.seq);
Pds_append_data_nosize(pds, msg->payload.speex.data, msg->payload.speex.size);
+
+ Msg_free(msg);
+
if (!pds->bOk)
Log_warn("Large Speex message from TCP"); /* XXX - pds resize? */
pds->maxsize = pds->offset;
Client_voiceMsg(client, pds);
+
Pds_free(pds);
}