Skip to content

Commit

Permalink
Merge pull request #92 from lrsdnlssn/master
Browse files Browse the repository at this point in the history
Let hook modify size, and also fix handling of large objects
  • Loading branch information
hefloryd authored Feb 10, 2021
2 parents 71bb370 + 8d5afc9 commit eb1848a
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 81 deletions.
2 changes: 1 addition & 1 deletion soes/ecat_slv.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ uint32_t ESC_download_post_objecthandler (uint16_t index, uint8_t subindex, uint
uint32_t ESC_upload_pre_objecthandler (uint16_t index,
uint8_t subindex,
void * data,
size_t size,
size_t *size,
uint16_t flags)
{
if (ESCvar.pre_object_upload_hook != NULL)
Expand Down
5 changes: 2 additions & 3 deletions soes/esc.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@
#define APPSTATE_INPUT 0x01
#define APPSTATE_OUTPUT 0x02

#define PREALLOC_FACTOR 3
#define PREALLOC_BUFFER_SIZE (PREALLOC_FACTOR * MBXSIZE)

typedef struct sm_cfg
Expand Down Expand Up @@ -326,7 +325,7 @@ typedef struct esc_cfg
uint32_t (*pre_object_upload_hook) (uint16_t index,
uint8_t subindex,
void * data,
size_t size,
size_t *size,
uint16_t flags);
uint32_t (*post_object_upload_hook) (uint16_t index,
uint8_t subindex,
Expand Down Expand Up @@ -450,7 +449,7 @@ typedef struct
uint32_t (*pre_object_upload_hook) (uint16_t index,
uint8_t subindex,
void * data,
size_t size,
size_t *size,
uint16_t flags);
uint32_t (*post_object_upload_hook) (uint16_t index,
uint8_t subindex,
Expand Down
Loading

0 comments on commit eb1848a

Please sign in to comment.