projects
/
umurmur.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README update. Now using Markdown syntax
[umurmur.git]
/
src
/
voicetarget.c
diff --git
a/src/voicetarget.c
b/src/voicetarget.c
index 3a8e0fd4eab353b19e601fbfdb1fdb49c566d86d..d01b3e9bf025e0322ba02d2117037838df97d403 100644
(file)
--- a/
src/voicetarget.c
+++ b/
src/voicetarget.c
@@
-1,5
+1,5
@@
-/* Copyright (C) 2009, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-20
09
, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009
-2011
, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-20
11
, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
All rights reserved.
@@
-29,6
+29,8
@@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <stdlib.h>
+#include <string.h>
#include "voicetarget.h"
#include "log.h"
#include "voicetarget.h"
#include "log.h"
@@
-52,7
+54,8
@@
void Voicetarget_add_session(client_t *client, int targetId, int sessionId)
}
}
}
}
-void Voicetarget_add_channel(client_t *client, int targetId, int channelId)
+void Voicetarget_add_channel(client_t *client, int targetId, int channelId,
+ bool_t linked, bool_t children)
{
struct dlist *itr;
voicetarget_t *vt;
{
struct dlist *itr;
voicetarget_t *vt;
@@
-62,8
+65,10
@@
void Voicetarget_add_channel(client_t *client, int targetId, int channelId)
int i;
vt = list_get_entry(itr, voicetarget_t, node);
for (i = 0; i < TARGET_MAX_CHANNELS; i++) {
int i;
vt = list_get_entry(itr, voicetarget_t, node);
for (i = 0; i < TARGET_MAX_CHANNELS; i++) {
- if (vt->channels[i] == -1) {
- vt->channels[i] = channelId;
+ if (vt->channels[i].channel == -1) {
+ vt->channels[i].channel = channelId;
+ vt->channels[i].linked = linked;
+ vt->channels[i].children = children;
Log_debug("Adding channel ID %d to voicetarget ID %d", channelId, targetId);
return;
}
Log_debug("Adding channel ID %d to voicetarget ID %d", channelId, targetId);
return;
}
@@
-83,7
+88,7
@@
void Voicetarget_add_id(client_t *client, int targetId)
Log_fatal("Out of memory");
memset(newtarget, 0, sizeof(voicetarget_t));
for (i = 0; i < TARGET_MAX_CHANNELS; i++)
Log_fatal("Out of memory");
memset(newtarget, 0, sizeof(voicetarget_t));
for (i = 0; i < TARGET_MAX_CHANNELS; i++)
- newtarget->channels[i] = -1;
+ newtarget->channels[i]
.channel
= -1;
for (i = 0; i < TARGET_MAX_SESSIONS; i++)
newtarget->sessions[i] = -1;
newtarget->id = targetId;
for (i = 0; i < TARGET_MAX_SESSIONS; i++)
newtarget->sessions[i] = -1;
newtarget->id = targetId;