renamed capwap directory to cw.
FossilOrigin-Name: 8a43dd9d05a4cb73210243ddd8df2a26f16c7ef2c4d4e36ab446de1f65d88223
This commit is contained in:
26
src/cw/cw_put_image_data.c
Normal file
26
src/cw/cw_put_image_data.c
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
#include "capwap.h"
|
||||
|
||||
|
||||
|
||||
int cw_put_image_data(uint8_t *dst,FILE *infile)
|
||||
{
|
||||
int bytes = fread(dst+1,1,1024,infile);
|
||||
|
||||
if (ferror(infile)){
|
||||
cw_put_byte(dst+0,5);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( feof(infile)){
|
||||
/* Last image block */
|
||||
cw_put_byte(dst,2);
|
||||
}
|
||||
else{
|
||||
cw_put_byte(dst,1);
|
||||
}
|
||||
|
||||
return bytes+1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user