summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-22 22:20:07 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-22 22:24:43 +0200
commitd92a0838b7d9179989bd76caac2ea96cf5c1885a (patch)
tree3f2f835e6f93e4bded0ab4933893ab7301cd4c55
parent6437a68ae0a92bcee64d6fc4586f345128fcb7c3 (diff)
downloadcmumble-d92a0838b7d9179989bd76caac2ea96cf5c1885a.tar.gz
cmumble-d92a0838b7d9179989bd76caac2ea96cf5c1885a.tar.bz2
cmumble-d92a0838b7d9179989bd76caac2ea96cf5c1885a.zip
Use g_print always, not printf directly
So we can use glibs print handler later.
-rw-r--r--src/cmumble.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/cmumble.c b/src/cmumble.c
index d849e05..99a4fc8 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -108,15 +108,15 @@ recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct context *ctx)
static void
recv_version(MumbleProto__Version *version, struct context *ctx)
{
- printf("version: 0x%x\n", version->version);
- printf("release: %s\n", version->release);
+ g_print("version: 0x%x\n", version->version);
+ g_print("release: %s\n", version->release);
}
static void
recv_channel_state(MumbleProto__ChannelState *state, struct context *ctx)
{
- printf("channel: id: %u, parent: %u, name: %s, description: %s, temporary: %d, position: %d\n",
- state->channel_id, state->parent, state->name, state->description, state->temporary, state->position);
+ g_print("channel: id: %u, parent: %u, name: %s, description: %s, temporary: %d, position: %d\n",
+ state->channel_id, state->parent, state->name, state->description, state->temporary, state->position);
}
static void
@@ -124,7 +124,7 @@ recv_server_sync(MumbleProto__ServerSync *sync, struct context *ctx)
{
ctx->session = sync->session;
- printf("got session: %d\n", ctx->session);
+ g_print("got session: %d\n", ctx->session);
}
static void
@@ -132,31 +132,33 @@ recv_crypt_setup(MumbleProto__CryptSetup *crypt, struct context *ctx)
{
int i;
+#if 0
if (crypt->has_key) {
- printf("key: 0x");
+ g_print("key: 0x");
for (i = 0; i < crypt->key.len; ++i)
- printf("%x", crypt->key.data[i]);
- printf("\n");
+ g_print("%x", crypt->key.data[i]);
+ g_print("\n");
}
if (crypt->has_client_nonce) {
- printf("client nonce: 0x");
+ g_print("client nonce: 0x");
for (i = 0; i < crypt->client_nonce.len; ++i)
- printf("%x", crypt->client_nonce.data[i]);
- printf("\n");
+ g_print("%x", crypt->client_nonce.data[i]);
+ g_print("\n");
}
if (crypt->has_server_nonce) {
- printf("server nonce: 0x");
+ g_print("server nonce: 0x");
for (i = 0; i < crypt->server_nonce.len; ++i)
- printf("%x", crypt->server_nonce.data[i]);
- printf("\n");
+ g_print("%x", crypt->server_nonce.data[i]);
+ g_print("\n");
}
+#endif
}
static void
recv_codec_version(MumbleProto__CodecVersion *codec, struct context *ctx)
{
- printf("Codec Version: alpha: %d, beta: %d, pefer_alpha: %d\n",
- codec->alpha, codec->beta, codec->prefer_alpha);
+ g_print("Codec Version: alpha: %d, beta: %d, pefer_alpha: %d\n",
+ codec->alpha, codec->beta, codec->prefer_alpha);
}