Mercurial > pidgin
comparison src/protocols/oscar/ft.c @ 3960:7ba5f2e13ee8
[gaim-migrate @ 4142]
Small oscar corrections. I don't think anything is really affected.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 13 Nov 2002 23:54:10 +0000 |
parents | 7ec84d1954fd |
children | 9891c1458eb7 |
comparison
equal
deleted
inserted
replaced
3959:9c2d8579ff3e | 3960:7ba5f2e13ee8 |
---|---|
14 #include <netdb.h> | 14 #include <netdb.h> |
15 #include <sys/socket.h> | 15 #include <sys/socket.h> |
16 #include <netinet/in.h> | 16 #include <netinet/in.h> |
17 #include <sys/utsname.h> /* for aim_directim_initiate */ | 17 #include <sys/utsname.h> /* for aim_directim_initiate */ |
18 #include <arpa/inet.h> /* for inet_ntoa */ | 18 #include <arpa/inet.h> /* for inet_ntoa */ |
19 #define G_DIR_SEPARATOR '/' | |
19 #endif | 20 #endif |
20 | |
21 /* XXX - I really don't think this should include gaim.h */ | |
22 #include "gaim.h" | |
23 | 21 |
24 #ifdef _WIN32 | 22 #ifdef _WIN32 |
25 #include "win32dep.h" | 23 #include "win32dep.h" |
26 #endif | 24 #endif |
27 | 25 |
1491 memcpy(newoft->hdr.rend.magic, "OFT2", 4); | 1489 memcpy(newoft->hdr.rend.magic, "OFT2", 4); |
1492 newoft->hdr.rend.hdrlen = aim_bstream_curpos(&newoft->data); | 1490 newoft->hdr.rend.hdrlen = aim_bstream_curpos(&newoft->data); |
1493 | 1491 |
1494 aim_tx_enqueue(sess, newoft); | 1492 aim_tx_enqueue(sess, newoft); |
1495 | 1493 |
1496 /* | |
1497 * Throw away the resource fork, in case we are receiving from a Mac. | |
1498 */ | |
1499 if (ft->fh.rfsize) { | |
1500 char *buf = malloc(ft->fh.rfsize); | |
1501 if (!buf) | |
1502 return -1; | |
1503 aim_recv(conn->fd, buf, ft->fh.rfsize); | |
1504 } | |
1505 | |
1506 if ( (userfunc = aim_callhandler(sess, conn, AIM_CB_FAM_OFT, AIM_CB_OFT_SENDFILEFILEREQ)) == NULL) | 1494 if ( (userfunc = aim_callhandler(sess, conn, AIM_CB_FAM_OFT, AIM_CB_OFT_SENDFILEFILEREQ)) == NULL) |
1507 return 1; | 1495 return 1; |
1508 | 1496 |
1509 { | 1497 { |
1510 char *cur; | 1498 char *cur; |
1520 | 1508 |
1521 | 1509 |
1522 /* | 1510 /* |
1523 * These were originally described by Josh Myer: | 1511 * These were originally described by Josh Myer: |
1524 * http://www.geocrawler.com/archives/3/896/2000/9/0/4291064/ | 1512 * http://www.geocrawler.com/archives/3/896/2000/9/0/4291064/ |
1525 * XXX this doesn't actualy work yet | 1513 * XXX this doesn't actually work yet |
1526 * -- wtm | 1514 * -- wtm |
1527 */ | 1515 */ |
1528 static int handlehdr_sendfile_resume(aim_session_t *sess, aim_conn_t *conn, aim_bstream_t *bs) { | 1516 static int handlehdr_sendfile_resume(aim_session_t *sess, aim_conn_t *conn, aim_bstream_t *bs) { |
1529 aim_frame_t *newoft; | 1517 aim_frame_t *newoft; |
1530 aim_msgcookie_t *cook; | 1518 aim_msgcookie_t *cook; |
2122 #endif | 2110 #endif |
2123 fh->encrypt = 0x0000; | 2111 fh->encrypt = 0x0000; |
2124 fh->compress = 0x0000; | 2112 fh->compress = 0x0000; |
2125 fh->totfiles = numfiles; | 2113 fh->totfiles = numfiles; |
2126 fh->filesleft = numfiles - filesdone; | 2114 fh->filesleft = numfiles - filesdone; |
2127 fh->totparts = 0x0001; | 2115 fh->totparts = 0x0001; /* set to 0x0002 sending Mac resource forks */ |
2128 fh->partsleft = 0x0001; | 2116 fh->partsleft = 0x0001; |
2129 fh->totsize = totsize; /* set to 0x0002 sending Mac resource forks */ | 2117 fh->totsize = totsize; |
2130 fh->size = size; | 2118 fh->size = size; |
2131 fh->modtime = (int)time(NULL); /* we'll go with current time for now */ | 2119 fh->modtime = (int)time(NULL); /* we'll go with current time for now */ |
2132 /* fh->checksum set above */ | 2120 /* fh->checksum set above */ |
2133 fh->rfcsum = 0x00000000; | 2121 fh->rfcsum = 0x00000000; |
2134 fh->rfsize = 0x00000000; | 2122 fh->rfsize = 0x00000000; |