summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmumble.c8
-rw-r--r--src/cmumble.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cmumble.c b/src/cmumble.c
index 2613ea8..ca8830f 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -296,7 +296,7 @@ cmumble_protocol_init(struct cmumble *cm)
cmumble_send_version(cm, &version);
cmumble_init_authenticate(&authenticate);
- authenticate.username = cm->user_name;
+ authenticate.username = (char *) cm->user_name;
authenticate.password = "";
authenticate.n_celt_versions = 1;
authenticate.celt_versions = &cm->audio.celt_bitstream_version;
@@ -308,8 +308,8 @@ cmumble_protocol_init(struct cmumble *cm)
g_source_unref(source);
}
-gchar *user = "unkown";
-gchar *host = "localhost";
+const gchar *user = NULL;
+const gchar *host = "localhost";
gint port = 64738;
gboolean verbose = FALSE;
@@ -350,7 +350,7 @@ int main(int argc, char **argv)
memset(&cm, 0, sizeof(cm));
- cm.user_name = user;
+ cm.user_name = user ? user : g_get_user_name();
cm.users = NULL;
cm.verbose = verbose;
diff --git a/src/cmumble.h b/src/cmumble.h
index 2dac580..7e83a73 100644
--- a/src/cmumble.h
+++ b/src/cmumble.h
@@ -27,7 +27,7 @@ struct cmumble {
uint32_t session;
gboolean authenticated;
- char *user_name;
+ const char *user_name;
int64_t sequence;