diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-05-25 10:57:31 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-05-25 10:57:31 +0200 |
commit | 936ded65a76dac7a7af56ef3f1ad6c84a32270c6 (patch) | |
tree | ad5482dae53582e90aa58ff3c25e93b6cd140cc3 /protocols/oscar/oscar.c | |
parent | fc630f9fb47690c30feaf4738727a213d633afc9 (diff) |
Disabling chat charset stuff again for now and fixed the crash-bug.
Unfortunately I can't figure out how to generate chat names that don't
break old BitlBees.
Diffstat (limited to 'protocols/oscar/oscar.c')
-rw-r--r-- | protocols/oscar/oscar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 5174f95c..c2716c6b 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -137,9 +137,9 @@ static char *extract_name(const char *name) { char *tmp; int i, j; char *x = strchr(name, '-'); - if (!x) return NULL; + if (!x) return g_strdup(name); x = strchr(++x, '-'); - if (!x) return NULL; + if (!x) return g_strdup(name); tmp = g_strdup(++x); for (i = 0, j = 0; x[i]; i++) { @@ -2606,9 +2606,9 @@ int oscar_chat_open(struct gaim_connection * gc, char *who) struct oscar_data * od = (struct oscar_data *)gc->proto_data; int ret; static int chat_id = 0; - char * chatname = g_new0(char, strlen(gc->username)+4); + char * chatname; - g_snprintf(chatname, strlen(gc->username) + 4, "%s%d", gc->username, chat_id++); + chatname = g_strdup_printf("%s%d", gc->username, chat_id++); ret = oscar_chat_join(gc, chatname); |