aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2005-12-15 10:14:38 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2005-12-15 10:14:38 +0100
commit11e090b246a86deb7b882217772b90fc52d7e4f6 (patch)
tree11046bd13f1cdd0684680b06d5c8cf0a2914d56f
parent22bf64eab8a79352317ee190cddfeef3011aa8dc (diff)
Moved variable declarations to the right place to make older compilers happy.
-rw-r--r--protocols/oscar/oscar.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 240bab14..488e80d1 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -1087,16 +1087,15 @@ static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_
char *name = extract_name(args->info.chat.roominfo.name);
int *exch = g_new0(int, 1);
GList *m = NULL;
+ char txt[1024];
+ struct aim_chat_invitation * inv = g_new0(struct aim_chat_invitation, 1);
+
m = g_list_append(m, g_strdup(name ? name : args->info.chat.roominfo.name));
*exch = args->info.chat.roominfo.exchange;
m = g_list_append(m, exch);
- char txt[1024];
-
g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", name, userinfo->sn, args->msg );
- struct aim_chat_invitation * inv = g_new0(struct aim_chat_invitation, 1);
-
inv->gc = gc;
inv->exchange = *exch;
inv->name = g_strdup(name);
@@ -2505,13 +2504,12 @@ int oscar_chat_send(struct gaim_connection * gc, int id, char *message)
{
struct oscar_data * od = (struct oscar_data*)gc->proto_data;
struct chat_connection * ccon;
-
- if(!(ccon = find_oscar_chat(gc, id)))
- return -1;
-
int ret;
guint8 len = strlen(message);
char *s;
+
+ if(!(ccon = find_oscar_chat(gc, id)))
+ return -1;
for (s = message; *s; s++)
if (*s & 128)
@@ -2606,12 +2604,13 @@ int oscar_chat_join(struct gaim_connection * gc, char * name)
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);
+
g_snprintf(chatname, strlen(gc->username) + 4, "%s%d", gc->username, chat_id++);
- int ret = oscar_chat_join(gc, chatname);
+ ret = oscar_chat_join(gc, chatname);
aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);