ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/image.c
(Generate patch)

Comparing deliantra/server/socket/image.c (file contents):
Revision 1.2 by root, Mon Mar 13 00:57:15 2006 UTC vs.
Revision 1.4 by root, Mon May 1 12:22:03 2006 UTC

1/* 1/*
2 * static char *rcsid_init_c = 2 * static char *rcsid_init_c =
3 * "$Id: image.c,v 1.2 2006/03/13 00:57:15 root Exp $"; 3 * "$Id: image.c,v 1.4 2006/05/01 12:22:03 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
152 abort(); 152 abort();
153 } 153 }
154 check_faceset_fallback(fallback, togo); 154 check_faceset_fallback(fallback, togo);
155} 155}
156 156
157#define MAX_IMAGE_SIZE (512*1024) 157#define MAX_IMAGE_SIZE 10000
158 158
159/** 159/**
160 * Loads all the image types into memory. 160 * Loads all the image types into memory.
161 * 161 *
162 * This way, we can easily send them to the client. We should really do something 162 * This way, we can easily send them to the client. We should really do something
453 /* It would make more sense to catch this pre-emptively in the code above. 453 /* It would make more sense to catch this pre-emptively in the code above.
454 * however, if this really happens, we probably just want to cut down the 454 * however, if this really happens, we probably just want to cut down the
455 * size to less than 1000, since that is what we claim the protocol would 455 * size to less than 1000, since that is what we claim the protocol would
456 * support. 456 * support.
457 */ 457 */
458 if (sl.len > MAXSOCKBUF) { 458 if (sl.len >= MAXSOCKBUF) {
459 LOG(llevError,"send_image_send: buffer overrun, %d > %d\n", sl.len, MAXSOCKBUF); 459 LOG(llevError,"send_image_send: buffer overrun, %d > %d\n", sl.len, MAXSOCKBUF);
460 abort(); 460 abort();
461 } 461 }
462 Send_With_Handling(ns, &sl); 462 Send_With_Handling(ns, &sl);
463 free(sl.buf); 463 free(sl.buf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines