diff src/toc.c @ 198:73e9a0bfff62

[gaim-migrate @ 208] Moved all the RVOUS stuff into rvous.c (mostly to reduce the size of dialogs.c). Started trying to implement FILE_GET_UID, without much luck. I'm going to do some dumps of the win client tomorrow to see if I can figure out what's going on a little better. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 30 Apr 2000 10:39:35 +0000
parents 24f0fef56a73
children bc117fbcf527
line wrap: on
line diff
--- a/src/toc.c	Sun Apr 30 00:52:53 2000 +0000
+++ b/src/toc.c	Sun Apr 30 10:39:35 2000 +0000
@@ -628,7 +628,7 @@
 
 	                ft = g_new0(struct file_transfer, 1);
 
-	                ft->cookie = frombase64(cookie);
+	                ft->cookie = g_strdup(cookie);
 	                ft->ip = g_strdup(pip);
 	                ft->port = port;
 	                if (i)
@@ -638,6 +638,7 @@
 	                ft->filename = g_strdup(name);
 	                ft->user = g_strdup(user);
 	                ft->size = totalsize;
+			sprintf(ft->UID, "%s", FILE_SEND_UID);
                 
 	                g_free(tmp);
 
@@ -647,16 +648,24 @@
 	                accept_file_dialog(ft);
 		} else if (!strcmp(uuid, FILE_GET_UID)) {
 			/* we're sending a file */
-			/* FIXME */
-			/* here's what needs to happen:
-			 * 1. dialog to accept/reject transfer
-			 * 2. if cancel, toc_rvous_cancel
-			 * 3. if accept, first open a socket, then accept
-			 *    a. on connect, send header
-			 *    b. wait for header
-			 *    c. send file
-			 *    d. wait for info
-			 */
+			ft = g_new0(struct file_transfer, 1);
+
+			ft->cookie = g_strdup(cookie);
+			ft->ip = g_strdup(pip);
+			ft->port = port;
+			if (i)
+				ft->message = g_strdup(messages[0]);
+			else
+				ft->message = NULL;
+			ft->user = g_strdup(user);
+			sprintf(ft->UID, "%s", FILE_GET_UID);
+
+			g_free(tmp);
+
+			for (i--; i >= 0; i--)
+				g_free(messages[i]);
+
+			accept_file_dialog(ft);
 		/*
 		} else if (!strcmp(uuid, VOICE_UID)) {
 		} else if (!strcmp(uuid, B_ICON_UID)) {