comparison src/protocols/oscar/oscar.c @ 2248:cef6d4e81aec

[gaim-migrate @ 2258] per-account? global? i don't know. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 09 Sep 2001 11:33:08 +0000
parents 933346315b9b
children 59a11f4fa4d0
comparison
equal deleted inserted replaced
2247:f721ae9582d5 2248:cef6d4e81aec
1284 ir->length = args->iconlen; 1284 ir->length = args->iconlen;
1285 ir->checksum = args->iconsum; 1285 ir->checksum = args->iconsum;
1286 ir->timestamp = args->iconstamp; 1286 ir->timestamp = args->iconstamp;
1287 } 1287 }
1288 1288
1289 if (gc->iconfile && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) { 1289 /*if (gc->user->iconfile && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {*/
1290 if (gc->user->iconfile) {
1290 FILE *file; 1291 FILE *file;
1291 struct stat st; 1292 struct stat st;
1292 1293
1293 if (!stat(gc->iconfile, &st)) { 1294 if (!stat(gc->user->iconfile, &st)) {
1294 char *buf = g_malloc(st.st_size); 1295 char *buf = g_malloc(st.st_size);
1295 file = fopen(gc->iconfile, "r"); 1296 file = fopen(gc->user->iconfile, "r");
1296 if (file) { 1297 if (file) {
1297 fread(buf, 1, st.st_size, file); 1298 fread(buf, 1, st.st_size, file);
1298 aim_send_icon(sess, conn, userinfo->sn, buf, st.st_size, 1299 aim_send_icon(sess, conn, userinfo->sn, buf, st.st_size,
1299 st.st_mtime, aim_iconsum(buf, st.st_size)); 1300 st.st_mtime, aim_iconsum(buf, st.st_size));
1300 fclose(file); 1301 fclose(file);
2074 struct aim_sendimext_args args; 2075 struct aim_sendimext_args args;
2075 GSList *h = odata->hasicons; 2076 GSList *h = odata->hasicons;
2076 struct icon_req *ir = NULL; 2077 struct icon_req *ir = NULL;
2077 char *who = normalize(name); 2078 char *who = normalize(name);
2078 struct stat st; 2079 struct stat st;
2079 2080 static fu8_t features[] = {0x01, 0x01, 0x01, 0x02, 0x66};
2080 args.flags = AIM_IMFLAGS_ACK; 2081
2082 args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES;
2083
2084 args.features = features;
2085 args.featureslen = sizeof(features);
2081 2086
2082 while (h) { 2087 while (h) {
2083 ir = h->data; 2088 ir = h->data;
2084 if (ir->request && !strcmp(who, ir->user)) 2089 if (ir->request && !strcmp(who, ir->user))
2085 break; 2090 break;
2089 ir->request = FALSE; 2094 ir->request = FALSE;
2090 args.flags |= AIM_IMFLAGS_BUDDYREQ; 2095 args.flags |= AIM_IMFLAGS_BUDDYREQ;
2091 debug_printf("sending buddy icon request with message\n"); 2096 debug_printf("sending buddy icon request with message\n");
2092 } 2097 }
2093 2098
2094 if (gc->iconfile && !stat(gc->iconfile, &st)) { 2099 if (gc->user->iconfile && !stat(gc->user->iconfile, &st)) {
2095 FILE *file = fopen(gc->iconfile, "r"); 2100 FILE *file = fopen(gc->user->iconfile, "r");
2096 if (file) { 2101 if (file) {
2097 char *buf = g_malloc(st.st_size); 2102 char *buf = g_malloc(st.st_size);
2098 fread(buf, 1, st.st_size, file); 2103 fread(buf, 1, st.st_size, file);
2099 2104
2100 args.iconlen = st.st_size; 2105 args.iconlen = st.st_size;