diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 10:29:16 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 10:43:41 +0200 |
commit | e50020020c9770e180735361182e9968249cbfa2 (patch) | |
tree | 635ba42f4e9f58160868f89cbc5f9be2e9bb909a /src/messages.c | |
parent | 7deb194171233af0fd3689cc1cd2f9b772d883d0 (diff) | |
download | cmumble-e50020020c9770e180735361182e9968249cbfa2.tar.gz cmumble-e50020020c9770e180735361182e9968249cbfa2.tar.bz2 cmumble-e50020020c9770e180735361182e9968249cbfa2.zip |
Move connection related stuff into connection.c
Diffstat (limited to 'src/messages.c')
-rw-r--r-- | src/messages.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/messages.c b/src/messages.c index 899ac14..8807166 100644 --- a/src/messages.c +++ b/src/messages.c @@ -63,8 +63,8 @@ send_msg(struct context *ctx, ProtobufCMessage *msg) add_preamble(preamble, type, buffer.len); g_static_mutex_lock(&write_mutex); - g_output_stream_write(ctx->output, preamble, PREAMBLE_SIZE, NULL, NULL); - g_output_stream_write(ctx->output, buffer.data, buffer.len, NULL, NULL); + g_output_stream_write(ctx->con.output, preamble, PREAMBLE_SIZE, NULL, NULL); + g_output_stream_write(ctx->con.output, buffer.data, buffer.len, NULL, NULL); g_static_mutex_unlock(&write_mutex); PROTOBUF_C_BUFFER_SIMPLE_CLEAR(&buffer); @@ -81,7 +81,7 @@ recv_msg(struct context *ctx, const struct mumble_callbacks *cbs) const callback_t *callbacks = (const callback_t *) cbs; GError *error = NULL; - ret = g_pollable_input_stream_read_nonblocking(ctx->input, + ret = g_pollable_input_stream_read_nonblocking(ctx->con.input, preamble, PREAMBLE_SIZE, NULL, &error); @@ -109,7 +109,8 @@ recv_msg(struct context *ctx, const struct mumble_callbacks *cbs) g_printerr("out of mem\n"); g_main_loop_quit (ctx->loop); } - ret = g_input_stream_read(G_INPUT_STREAM(ctx->input), data, len, NULL, NULL); + ret = g_input_stream_read(G_INPUT_STREAM(ctx->con.input), + data, len, NULL, NULL); /* tunneled udp data - not a regular protobuf message * create dummy ProtobufCMessage */ |