diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-28 19:44:32 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-28 19:45:48 +0200 |
commit | 2746ba8ed0032ca9361d02b98eeb0dab2e640bfe (patch) | |
tree | 5e3dff17a2fed7581f0bb9af8549100541a479ff /src/cmumble.c | |
parent | 9bbc3d2996a510e417a1ca19fe21c7c4623d2208 (diff) | |
download | cmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.tar.gz cmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.tar.bz2 cmumble-2746ba8ed0032ca9361d02b98eeb0dab2e640bfe.zip |
Store own user in cmumble_context
Diffstat (limited to 'src/cmumble.c')
-rw-r--r-- | src/cmumble.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmumble.c b/src/cmumble.c index d276c8a..bca92c3 100644 --- a/src/cmumble.c +++ b/src/cmumble.c @@ -88,6 +88,7 @@ static void recv_server_sync(MumbleProto__ServerSync *sync, struct cmumble_context *ctx) { ctx->session = sync->session; + ctx->user = find_user(ctx, ctx->session); if (sync->welcome_text) g_print("Welcome Message: %s\n", sync->welcome_text); @@ -165,6 +166,9 @@ recv_user_state(MumbleProto__UserState *state, struct cmumble_context *ctx) user->id = state->user_id; user->channel = find_channel(ctx, state->channel_id); + if (ctx->session == user->session) + ctx->user = user; + cmumble_audio_create_playback_pipeline(ctx, user); g_print("receive user: %s\n", user->name); ctx->users = g_list_prepend(ctx->users, user); |