# HG changeset patch # User Eric Warmenhoven # Date 959208429 0 # Node ID 325d9804df10d60841f7f8e7c01e3171d639e992 # Parent e159ba2486fc026c308731f84c8e07b54ba62339 [gaim-migrate @ 270] Preparing for when libfaim can do rvous stuff committer: Tailor Script diff -r e159ba2486fc -r 325d9804df10 src/rvous.c --- a/src/rvous.c Wed May 24 19:12:50 2000 +0000 +++ b/src/rvous.c Wed May 24 22:47:09 2000 +0000 @@ -67,21 +67,12 @@ static void cancel_callback(GtkWidget *widget, struct file_transfer *ft) { - char *send = g_malloc(256); - if (ft->accepted) { - g_free(send); return; } -#ifndef USE_OSCAR - g_snprintf(send, 255, "toc_rvous_cancel %s %s %s", normalize(ft->user), - ft->cookie, ft->UID); - sflap_send(send, strlen(send), TYPE_DATA); -#else - /* FIXME : can we really do this? */ -#endif - g_free(send); + serv_rvous_cancel(ft->user, ft->cookie, ft->UID); + free_ft(ft); } @@ -237,13 +228,7 @@ gtk_widget_destroy(ft->window); ft->window = NULL; -#ifndef USE_OSCAR - g_snprintf(send, 255, "toc_rvous_accept %s %s %s", normalize(ft->user), - ft->cookie, ft->UID); - sflap_send(send, strlen(send), TYPE_DATA); -#else - /* FIXME (?) */ -#endif + serv_rvous_accept(ft->user, ft->cookie, ft->UID); g_free(send); @@ -346,12 +331,7 @@ if (!cont) { char *tmp = frombase64(ft->cookie); -#ifndef USE_OSCAR - sprintf(buf, "toc_rvous_cancel %s %s %s", ft->user, tmp, ft->UID); - sflap_send(buf, strlen(buf), TYPE_DATA); -#else - /* FIXME (?) */ -#endif + serv_rvous_cancel(ft->user, tmp, ft->UID); close(ft->fd); free_ft(ft); g_free(header); @@ -405,13 +385,7 @@ gtk_widget_destroy(ft->window); ft->window = NULL; -#ifndef USE_OSCAR - g_snprintf(send, 255, "toc_rvous_accept %s %s %s", normalize(ft->user), - ft->cookie, ft->UID); - sflap_send(send, strlen(send), TYPE_DATA); -#else - /* FIXME */ -#endif + serv_rvous_accept(ft->user, ft->cookie, ft->UID); g_free(send); @@ -622,12 +596,7 @@ if (!cont) { char *tmp = frombase64(ft->cookie); -#ifndef USE_OSCAR - sprintf(buf, "toc_rvous_cancel %s %s %s", ft->user, tmp, ft->UID); - sflap_send(buf, strlen(buf), TYPE_DATA); -#else - /* FIXME */ -#endif + serv_rvous_cancel(ft->user, tmp, ft->UID); g_free(buf); close(ft->fd); free_ft(ft); diff -r e159ba2486fc -r 325d9804df10 src/server.c --- a/src/server.c Wed May 24 19:12:50 2000 +0000 +++ b/src/server.c Wed May 24 22:47:09 2000 +0000 @@ -924,5 +924,23 @@ chat_write(b, who, w, message); } - +void serv_rvous_accept(char *name, char *cookie, char *uid) +{ + char buf[MSG_LEN]; +#ifndef USE_OSCAR + g_snprintf(buf, MSG_LEN, "toc_rvous_accept %s %s %s", normalize(name), + cookie, uid); + sflap_send(buf, strlen(buf), TYPE_DATA); +#endif +} + +void serv_rvous_cancel(char *name, char *cookie, char *uid) +{ + char buf[MSG_LEN]; +#ifndef USE_OSCAR + g_snprintf(buf, MSG_LEN, "toc_rvous_cancel %s %s %s", normalize(name), + cookie, uid); + sflap_send(buf, strlen(buf), TYPE_DATA); +#endif +}