Mercurial > pidgin
changeset 1102:d7944415b1cc
[gaim-migrate @ 1112]
updates to changelog, fix for potential segfault in buddy.c, making dir info in server.c connection-based, and making gaim dependent on toc/rvous only for build_toc_config and parse_toc_buddy_list (and of course, toc_init).
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 16 Nov 2000 23:51:49 +0000 |
parents | 0ef4386edc29 |
children | 7aabbbaae829 |
files | ChangeLog src/buddy.c src/dialogs.c src/gaim.h src/rvous.c src/server.c |
diffstat | 6 files changed, 37 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Nov 16 10:06:12 2000 +0000 +++ b/ChangeLog Thu Nov 16 23:51:49 2000 +0000 @@ -1,15 +1,16 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! version 0.11.0: - * multiple connections - * logs now stored to ~/.gaim/logs rather than ~/.gaim/SN/ - * protocol plugins - * user configurable sounds - * scroll bar now functions properly in chat room user lists + * Multiple connections + * Protocol plugins (IRC (plugins/irc.c), Yahoo (plugins/yay)) + * Logs now stored to ~/.gaim/logs rather than ~/.gaim/SN/ + * User configurable sounds + * Scroll bar now functions properly in chat room user lists * X-Idle support added (thanks bmiller and bryner) * small change in the way away messages are displayed (Thanks Ryan C. Gordon) - * plugin system uses GModule now (improves portability, adds features) + * Plugin system uses GModule now (improves portability, adds features) + * Perl got updates (reread plugins/PERL-HOWTO) version 0.10.3 (10/09/2000): * Segfault when viewing user info fixed
--- a/src/buddy.c Thu Nov 16 10:06:12 2000 +0000 +++ b/src/buddy.c Thu Nov 16 23:51:49 2000 +0000 @@ -416,6 +416,7 @@ void handle_click_buddy(GtkWidget *widget, GdkEventButton *event, struct buddy_show *b) { + if (!b->connlist) return; if (event->type == GDK_2BUTTON_PRESS && event->button == 1) { struct conversation *c;
--- a/src/dialogs.c Thu Nov 16 10:06:12 2000 +0000 +++ b/src/dialogs.c Thu Nov 16 23:51:49 2000 +0000 @@ -1180,7 +1180,9 @@ char *country = gtk_entry_get_text(GTK_ENTRY(b->country)); - serv_set_dir(first, middle, last, maiden, city, state, country, web); + /* FIXME */ + if (connections) + serv_set_dir(connections->data, first, middle, last, maiden, city, state, country, web); destroy_dialog(NULL, b->window); g_free(b); @@ -1939,7 +1941,9 @@ state = gtk_entry_get_text(GTK_ENTRY(b->stateentry)); country = gtk_entry_get_text(GTK_ENTRY(b->countryentry)); - serv_dir_search(first, middle, last, maiden, city, state, country, ""); + /* FIXME */ + if (connections) + serv_dir_search(connections->data, first, middle, last, maiden, city, state, country, ""); destroy_dialog(NULL, b->window); } @@ -1949,7 +1953,9 @@ email = gtk_entry_get_text(GTK_ENTRY(b->emailentry)); - serv_dir_search("","","","","","","", email); + /* FIXME */ + if (connections) + serv_dir_search(connections->data, "","","","","","","", email); destroy_dialog(NULL, b->window); }
--- a/src/gaim.h Thu Nov 16 10:06:12 2000 +0000 +++ b/src/gaim.h Thu Nov 16 23:51:49 2000 +0000 @@ -649,8 +649,8 @@ extern void serv_rem_deny(struct gaim_connection *, char *); extern void serv_set_permit_deny(struct gaim_connection *); extern void serv_warn(struct gaim_connection *, char *, int); -extern void serv_set_dir(char *, char *, char *, char *, char *, char *, char *, int); -extern void serv_dir_search(char *, char *, char *, char *, char *, char *, char *, char *); +extern void serv_set_dir(struct gaim_connection *, char *, char *, char *, char *, char *, char *, char *, int); +extern void serv_dir_search(struct gaim_connection *, char *, char *, char *, char *, char *, char *, char *, char *); extern void serv_accept_chat(struct gaim_connection *, int); extern void serv_join_chat(struct gaim_connection *, int, char *); extern void serv_chat_invite(struct gaim_connection *, int, char *, char *); @@ -666,8 +666,6 @@ extern void serv_got_joined_chat(struct gaim_connection *, int, char *); extern void serv_got_chat_left(struct gaim_connection *, int); extern void serv_got_chat_in(struct gaim_connection *, int, char *, int, char *); -extern void serv_rvous_accept(struct gaim_connection *, char *, char *, char *); -extern void serv_rvous_cancel(struct gaim_connection *, char *, char *, char *); /* Functions in conversation.c */ extern void update_convo_add_button(struct conversation *);
--- a/src/rvous.c Thu Nov 16 10:06:12 2000 +0000 +++ b/src/rvous.c Thu Nov 16 23:51:49 2000 +0000 @@ -73,11 +73,14 @@ static void cancel_callback(GtkWidget *widget, struct file_transfer *ft) { + char buf[MSG_LEN]; + if (ft->accepted) { return; } - serv_rvous_cancel(ft->gc, ft->user, ft->cookie, ft->UID); + g_snprintf(buf, MSG_LEN, "toc_rvous_cancel %s %s %s", ft->user, ft->cookie, ft->UID); + sflap_send(ft->gc, buf, -1, TYPE_DATA); free_ft(ft); } @@ -210,6 +213,7 @@ char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window)); char buf[BUF_LONG]; char *buf2; + char tmp_buf[MSG_LEN]; struct file_header header; int read_rv; guint32 rcv; @@ -233,7 +237,9 @@ gtk_widget_destroy(ft->window); ft->window = NULL; - serv_rvous_accept(ft->gc, ft->user, ft->cookie, ft->UID); + g_snprintf(tmp_buf, MSG_LEN, "toc_rvous_accept %s %s %s", ft->user, ft->cookie, ft->UID); + sflap_send(ft->gc, tmp_buf, -1, TYPE_DATA); + /* XXX is ft->port in host order or network order? */ @@ -332,7 +338,8 @@ if (!cont) { char *tmp = frombase64(ft->cookie); - serv_rvous_cancel(ft->gc, ft->user, tmp, ft->UID); + g_snprintf(tmp_buf, MSG_LEN, "toc_rvous_cancel %s %s %s", ft->user, ft->cookie, ft->UID); + sflap_send(ft->gc, tmp_buf, -1, TYPE_DATA); close(ft->fd); free_ft(ft); return; @@ -466,7 +473,9 @@ if (!cont) { char *tmp = frombase64(ft->cookie); - serv_rvous_cancel(ft->gc, ft->user, tmp, ft->UID); + char tmp_buf[MSG_LEN]; + g_snprintf(tmp_buf, MSG_LEN, "toc_rvous_cancel %s %s %s", ft->user, ft->cookie, ft->UID); + sflap_send(ft->gc, tmp_buf, -1, TYPE_DATA); close(ft->fd); free_ft(ft); return; @@ -485,6 +494,7 @@ char *file = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window))); char buf[BUF_LONG]; char *buf2; + char tmp_buf[MSG_LEN]; int read_rv; struct file_header fhdr; guint32 rcv = 0; @@ -512,7 +522,8 @@ gtk_widget_destroy(ft->window); ft->window = NULL; - serv_rvous_accept(ft->gc, ft->user, ft->cookie, ft->UID); + g_snprintf(tmp_buf, MSG_LEN, "toc_rvous_accept %s %s %s", ft->user, ft->cookie, ft->UID); + sflap_send(ft->gc, tmp_buf, -1, TYPE_DATA); /* XXX is ft->port in host order or network order? */
--- a/src/server.c Thu Nov 16 10:06:12 2000 +0000 +++ b/src/server.c Thu Nov 16 23:51:49 2000 +0000 @@ -142,26 +142,16 @@ (*g->prpl->get_dir)(g, name); } -void serv_set_dir(char *first, char *middle, char *last, char *maiden, +void serv_set_dir(struct gaim_connection *g, char *first, char *middle, char *last, char *maiden, char *city, char *state, char *country, int web) { - /* FIXME */ - struct gaim_connection *g; - if (!connections) return; - g = connections->data; - if (g && g->prpl && g->prpl->set_dir) (*g->prpl->set_dir)(g, first, middle, last, maiden, city, state, country, web); } -void serv_dir_search(char *first, char *middle, char *last, char *maiden, +void serv_dir_search(struct gaim_connection *g, char *first, char *middle, char *last, char *maiden, char *city, char *state, char *country, char *email) { - /* FIXME */ - struct gaim_connection *g; - if (!connections) return; - g = connections->data; - if (g && g->prpl && g->prpl->dir_search) (*g->prpl->dir_search)(g, first, middle, last, maiden, city, state, country, email); } @@ -708,23 +698,6 @@ chat_write(b, who, w, message); } -void serv_rvous_accept(struct gaim_connection *g, char *name, char *cookie, char *uid) -{ - /* Oscar doesn't matter here because this won't ever be called for it */ - char buf[MSG_LEN]; - g_snprintf(buf, MSG_LEN, "toc_rvous_accept %s %s %s", normalize(name), - cookie, uid); - sflap_send(g, buf, -1, TYPE_DATA); -} - -void serv_rvous_cancel(struct gaim_connection *g, char *name, char *cookie, char *uid) -{ - char buf[MSG_LEN]; - g_snprintf(buf, MSG_LEN, "toc_rvous_cancel %s %s %s", normalize(name), - cookie, uid); - sflap_send(g, buf, -1, TYPE_DATA); -} - void send_keepalive(gpointer d) { struct gaim_connection *gc = (struct gaim_connection *)d; debug_print("sending oscar NOP\n");