… | |
… | |
312 | * the caching attribute. |
312 | * the caching attribute. |
313 | * |
313 | * |
314 | */ |
314 | */ |
315 | |
315 | |
316 | void |
316 | void |
317 | SetFaceMode (char *buf, int len, NewSocket *ns) |
317 | SetFaceMode (char *buf, int len, client_socket *ns) |
318 | { |
318 | { |
319 | int mask = (atoi (buf) & CF_FACE_CACHE), mode = (atoi (buf) & ~CF_FACE_CACHE); |
319 | int mask = (atoi (buf) & CF_FACE_CACHE), mode = (atoi (buf) & ~CF_FACE_CACHE); |
320 | |
320 | |
321 | if (mode == CF_FACE_NONE) |
321 | if (mode == CF_FACE_NONE) |
322 | ns->facecache = 1; |
322 | ns->facecache = 1; |
… | |
… | |
336 | * This will be called often if the client is |
336 | * This will be called often if the client is |
337 | * caching images. |
337 | * caching images. |
338 | */ |
338 | */ |
339 | |
339 | |
340 | void |
340 | void |
341 | SendFaceCmd (char *buff, int len, NewSocket * ns) |
341 | SendFaceCmd (char *buff, int len, client_socket * ns) |
342 | { |
342 | { |
343 | long tmpnum = atoi (buff); |
343 | long tmpnum = atoi (buff); |
344 | short facenum = tmpnum & 0xffff; |
344 | short facenum = tmpnum & 0xffff; |
345 | |
345 | |
346 | if (facenum != 0) |
346 | if (facenum != 0) |
… | |
… | |
355 | * face (and askface is the only place that should be setting it). Otherwise, |
355 | * face (and askface is the only place that should be setting it). Otherwise, |
356 | * we look at the facecache, and if set, send the image name. |
356 | * we look at the facecache, and if set, send the image name. |
357 | */ |
357 | */ |
358 | |
358 | |
359 | void |
359 | void |
360 | esrv_send_face (NewSocket *ns, short face_num, int nocache) |
360 | esrv_send_face (client_socket *ns, short face_num, int nocache) |
361 | { |
361 | { |
362 | char fallback; |
362 | char fallback; |
363 | |
363 | |
364 | if (face_num <= 0 || face_num >= nrofpixmaps) |
364 | if (face_num <= 0 || face_num >= nrofpixmaps) |
365 | { |
365 | { |
… | |
… | |
411 | * and the image_info file information. See the doc/Developers/protocol |
411 | * and the image_info file information. See the doc/Developers/protocol |
412 | * if you want further detail. |
412 | * if you want further detail. |
413 | */ |
413 | */ |
414 | |
414 | |
415 | void |
415 | void |
416 | send_image_info (NewSocket * ns, char *params) |
416 | send_image_info (client_socket * ns, char *params) |
417 | { |
417 | { |
418 | packet sl; |
418 | packet sl; |
419 | |
419 | |
420 | sl.printf ("replyinfo image_info\n%d\n%d\n", nrofpixmaps - 1, bmaps_checksum); |
420 | sl.printf ("replyinfo image_info\n%d\n%d\n", nrofpixmaps - 1, bmaps_checksum); |
421 | |
421 | |
… | |
… | |
436 | * For each image in [start..stop] sends |
436 | * For each image in [start..stop] sends |
437 | * - checksum |
437 | * - checksum |
438 | * - name |
438 | * - name |
439 | */ |
439 | */ |
440 | void |
440 | void |
441 | send_image_sums (NewSocket * ns, char *params) |
441 | send_image_sums (client_socket * ns, char *params) |
442 | { |
442 | { |
443 | int start, stop; |
443 | int start, stop; |
444 | char *cp, buf[MAX_BUF]; |
444 | char *cp, buf[MAX_BUF]; |
445 | |
445 | |
446 | packet sl; |
446 | packet sl; |