26 |
|
|
27 |
|
struct tftp_session { |
28 |
|
int in_use; |
29 |
< |
unsigned char filename[TFTP_FILENAME_MAX]; |
29 |
> |
char filename[TFTP_FILENAME_MAX]; |
30 |
|
|
31 |
|
struct in_addr client_ip; |
32 |
|
u_int16_t client_port; |
239 |
|
spt = &tftp_sessions[s]; |
240 |
|
|
241 |
|
src = tp->x.tp_buf; |
242 |
< |
dst = spt->filename; |
242 |
> |
dst = (u_int8_t *)spt->filename; |
243 |
|
n = pktlen - ((uint8_t *)&tp->x.tp_buf[0] - (uint8_t *)tp); |
244 |
|
|
245 |
|
/* get name */ |
292 |
|
|
293 |
|
/* check if the file exists */ |
294 |
|
|
295 |
< |
if (tftp_read_data(spt, 0, spt->filename, 0) < 0) { |
295 |
> |
if (tftp_read_data(spt, 0, (u_int8_t *)spt->filename, 0) < 0) { |
296 |
|
tftp_send_error(spt, 1, "File not found", tp); |
297 |
|
return; |
298 |
|
} |