Mercurial > pidgin
changeset 5954:fccc33d4b8fa
[gaim-migrate @ 6398]
I made serv_set_info or whatever it's called take a const char *
I don't really remember why
I also made some other small changes
There should be no functionality change
I'm still struggling to get available messages working. They haunt my
dreams. Like the gray gorilla, or the Silhouette of the past, fading
into the dim light of the moon.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 25 Jun 2003 04:20:30 +0000 |
parents | bc71bd31c223 |
children | 235a14ae42f1 |
files | plugins/gaim-remote/remote.c src/dialogs.c src/protocols/jabber/jabber.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c src/prpl.h src/server.c src/server.h |
diffstat | 8 files changed, 29 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c Wed Jun 25 03:40:03 2003 +0000 +++ b/plugins/gaim-remote/remote.c Wed Jun 25 04:20:30 2003 +0000 @@ -708,12 +708,16 @@ plugin_load(GaimPlugin *plugin) { core_main(); + + return TRUE; } static gboolean plugin_unload(GaimPlugin *plugin) { core_quit(); + + return TRUE; } static GaimPluginInfo info =
--- a/src/dialogs.c Wed Jun 25 03:40:03 2003 +0000 +++ b/src/dialogs.c Wed Jun 25 04:20:30 2003 +0000 @@ -1884,11 +1884,13 @@ junk = gtk_text_view_get_text(GTK_TEXT_VIEW(b->text), FALSE); if (b->account) { - strncpy_withhtml(b->account->user_info, junk, sizeof b->account->user_info); + gchar *tmp = strdup_withhtml(junk); + gaim_account_set_user_info(b->account, junk); + g_free(tmp); gc = b->account->gc; if (gc) - serv_set_info(gc, b->account->user_info); + serv_set_info(gc, gaim_account_get_user_info(b->account)); } g_free(junk); destroy_dialog(NULL, b->window); @@ -5018,13 +5020,13 @@ /* * Set the user info and (possibly) send to the server */ - if (b->account) { - strncpy(b->account->user_info, tmp, sizeof b->account->user_info); - gc = b->account->gc; - - if (gc) - serv_set_info(gc, b->account->user_info); - } + if (b->account) { + gaim_account_set_user_info(b->account, tmp); + gc = b->account->gc; + + if (gc) + serv_set_info(gc, gaim_account_get_user_info(b->account)); + } g_free(tmp);
--- a/src/protocols/jabber/jabber.c Wed Jun 25 03:40:03 2003 +0000 +++ b/src/protocols/jabber/jabber.c Wed Jun 25 04:20:30 2003 +0000 @@ -3915,12 +3915,13 @@ /* * Send vCard info to Jabber server */ -static void jabber_set_info(GaimConnection *gc, char *info) +static void jabber_set_info(GaimConnection *gc, const char *info) { xmlnode x, vc_node; char *id; struct jabber_data *jd = gc->proto_data; gjconn gjc = jd->gjc; + gchar *info2; x = xmlnode_new_tag("iq"); xmlnode_put_attrib(x, "type", "set"); @@ -3932,7 +3933,8 @@ /* * Send only if there's actually any *information* to send */ - vc_node = xmlstr2xmlnode(info); + info2 = g_strdup(info); + vc_node = xmlstr2xmlnode(info2); if(vc_node) { if (xmlnode_get_name(vc_node) && @@ -3946,6 +3948,7 @@ } xmlnode_free(x); + g_free(info2); } /*
--- a/src/protocols/oscar/oscar.c Wed Jun 25 03:40:03 2003 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jun 25 04:20:30 2003 +0000 @@ -272,7 +272,7 @@ static gboolean gaim_icon_timerfunc(gpointer data); /* prpl actions - remove this at some point */ -static void oscar_set_info(GaimConnection *gc, char *text); +static void oscar_set_info(GaimConnection *gc, const char *text); static void oscar_free_name_data(struct name_data *data) { g_free(data->name); @@ -3816,7 +3816,7 @@ if (od->icq) aim_bos_setprofile(sess, fr->conn, NULL, NULL, 0, NULL, NULL, 0, caps_icq); else - oscar_set_info(gc, gc->account->user_info); /* XXX - unneeded? */ + oscar_set_info(gc, gc->account->user_info); return 1; } @@ -4407,7 +4407,7 @@ aim_bos_setidle(od->sess, od->conn, time); } -static void oscar_set_info(GaimConnection *gc, char *text) { +static void oscar_set_info(GaimConnection *gc, const char *text) { struct oscar_data *od = (struct oscar_data *)gc->proto_data; fu32_t flags = 0; char *msg = NULL;
--- a/src/protocols/toc/toc.c Wed Jun 25 03:40:03 2003 +0000 +++ b/src/protocols/toc/toc.c Wed Jun 25 04:20:30 2003 +0000 @@ -1084,7 +1084,7 @@ sflap_send(g, buf, -1, TYPE_DATA); } -static void toc_set_info(GaimConnection *g, char *info) +static void toc_set_info(GaimConnection *g, const char *info) { char buf[BUF_LEN * 2], buf2[BUF_LEN * 2]; g_snprintf(buf2, sizeof buf2, "%s", info);
--- a/src/prpl.h Wed Jun 25 03:40:03 2003 +0000 +++ b/src/prpl.h Wed Jun 25 04:20:30 2003 +0000 @@ -231,7 +231,7 @@ void (*close)(GaimConnection *); int (*send_im)(GaimConnection *, const char *who, const char *message, int len, int away); - void (*set_info)(GaimConnection *, char *info); + void (*set_info)(GaimConnection *, const char *info); int (*send_typing)(GaimConnection *, char *name, int typing); void (*get_info)(GaimConnection *, const char *who); void (*set_away)(GaimConnection *, char *state, char *message);
--- a/src/server.c Wed Jun 25 03:40:03 2003 +0000 +++ b/src/server.c Wed Jun 25 04:20:30 2003 +0000 @@ -147,9 +147,8 @@ account = gaim_connection_get_account(gc); if (gaim_account_get_user_info(account) != NULL) { - /* g_malloc(strlen(gc->user->user_info) * 4); - strncpy_withhtml(buf, gc->user->user_info, strlen(gc->user->user_info) * 4); */ - serv_set_info(gc, (char *)gaim_account_get_user_info(account)); + /* buf = strdup_withhtml(gc->user->user_info); */ + serv_set_info(gc, gaim_account_get_user_info(account)); /* g_free(buf); */ } @@ -358,7 +357,7 @@ } } -void serv_set_info(GaimConnection *g, char *info) +void serv_set_info(GaimConnection *g, const char *info) { GaimPluginProtocolInfo *prpl_info = NULL;
--- a/src/server.h Wed Jun 25 03:40:03 2003 +0000 +++ b/src/server.h Wed Jun 25 04:20:30 2003 +0000 @@ -57,7 +57,7 @@ void serv_get_info(GaimConnection *, char *); void serv_get_dir(GaimConnection *, char *); void serv_set_idle(GaimConnection *, int); -void serv_set_info(GaimConnection *, char *); +void serv_set_info(GaimConnection *, const char *); void serv_set_away(GaimConnection *, char *, char *); void serv_set_away_all(char *); int serv_send_typing(GaimConnection *, char *, int);