equal
deleted
inserted
replaced
333 |
333 |
334 /* If the reply might exceed the size of the packet, only reply |
334 /* If the reply might exceed the size of the packet, only reply |
335 * the current list and do not send the other data. |
335 * the current list and do not send the other data. |
336 * The name could be an empty string, if so take the filename. */ |
336 * The name could be an empty string, if so take the filename. */ |
337 packet_len += sizeof(c.grfid) + sizeof(c.md5sum) + |
337 packet_len += sizeof(c.grfid) + sizeof(c.md5sum) + |
338 min(strlen((f->name != NULL && strlen(f->name) > 0) ? f->name : f->filename) + 1, NETWORK_GRF_NAME_LENGTH); |
338 min(strlen((f->name != NULL && strlen(f->name) > 0) ? f->name : f->filename) + 1, (size_t)NETWORK_GRF_NAME_LENGTH); |
339 if (packet_len > SEND_MTU - 4) { // 4 is 3 byte header + grf count in reply |
339 if (packet_len > SEND_MTU - 4) { // 4 is 3 byte header + grf count in reply |
340 break; |
340 break; |
341 } |
341 } |
342 in_reply[in_reply_count] = f; |
342 in_reply[in_reply_count] = f; |
343 in_reply_count++; |
343 in_reply_count++; |