Update of /cvsroot/gaim/gaim/src/protocols/toc
In directory usw-pr-cvs1:/tmp/cvs-serv1582/src/protocols/toc
Modified Files:
toc.c
Log Message:
Fix to make toc file transfer work with Trillian.
Don't use this.
Index: toc.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- toc.c 28 Mar 2002 18:22:49 -0000 1.46
+++ toc.c 4 Apr 2002 00:59:12 -0000 1.47
@@ -789,9 +789,9 @@
} else if (!strcasecmp(c, "RVOUS_PROPOSE")) {
char *user, *uuid, *cookie;
int seq;
- char *rip, *pip, *vip;
+ char *rip, *pip, *vip, *trillian;
int port;
-
+
user = strtok(NULL, ":");
uuid = strtok(NULL, ":");
cookie = strtok(NULL, ":");
@@ -809,11 +809,16 @@
struct ft_request *ft;
for (i = 0; i < 4; i++) {
- sscanf(strtok(NULL, ":"), "%d", &unk[i]);
+ trillian = strtok(NULL, ":");
+ sscanf(trillian, "%d", &unk[i]);
if (unk[i] == 10001)
break;
- frombase64(strtok(NULL, ":"), &messages[i], NULL);
+ /* Trillian likes to send an empty token as a message, rather than
+ no message at all. */
+ if (*(trillian + strlen(trillian) +1) != ':')
+ frombase64(strtok(NULL, ":"), &messages[i], NULL);
}
+
frombase64(strtok(NULL, ":"), &tmp, NULL);
subtype = tmp[1];
@@ -866,7 +871,10 @@
sscanf(strtok(NULL, ":"), "%d", unk + i);
if (unk[i] == 10001)
break;
- frombase64(strtok(NULL, ":"), &messages[i], NULL);
+ /* Trillian likes to send an empty token as a message, rather than
+ no message at all. */
+ if (*(trillian + strlen(trillian) +1) != ':')
+ frombase64(strtok(NULL, ":"), &messages[i], NULL);
}
frombase64(strtok(NULL, ":"), &tmp, NULL);
|