Handle T action with chunked transfer correctly
This commit is contained in:
parent
c87dcdbe3c
commit
acc43ce9dc
@ -320,6 +320,7 @@ handle_add_command(GraphicsManager *self, const GraphicsCommand *g, const uint8_
|
|||||||
if (tt == 'd' && self->loading_image) init_img = false;
|
if (tt == 'd' && self->loading_image) init_img = false;
|
||||||
if (init_img) {
|
if (init_img) {
|
||||||
self->loading_image = 0;
|
self->loading_image = 0;
|
||||||
|
self->last_init_img_action = g->action;
|
||||||
if (g->data_width > 10000 || g->data_height > 10000) ABRT(EINVAL, "Image too large");
|
if (g->data_width > 10000 || g->data_height > 10000) ABRT(EINVAL, "Image too large");
|
||||||
remove_images(self, add_trim_predicate);
|
remove_images(self, add_trim_predicate);
|
||||||
img = find_or_create_image(self, g->id, &existing);
|
img = find_or_create_image(self, g->id, &existing);
|
||||||
@ -602,7 +603,7 @@ grman_handle_command(GraphicsManager *self, const GraphicsCommand *g, const uint
|
|||||||
case 'T':
|
case 'T':
|
||||||
image = handle_add_command(self, g, payload, is_dirty);
|
image = handle_add_command(self, g, payload, is_dirty);
|
||||||
ret = create_add_response(self, g, image != NULL);
|
ret = create_add_response(self, g, image != NULL);
|
||||||
if (g->action == 'T') handle_put_command(self, g, c, is_dirty, image);
|
if (self->last_init_img_action == 'T') handle_put_command(self, g, c, is_dirty, image);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
if (!g->id) {
|
if (!g->id) {
|
||||||
|
|||||||
@ -64,6 +64,7 @@ typedef struct {
|
|||||||
|
|
||||||
index_type lines, columns;
|
index_type lines, columns;
|
||||||
size_t image_count, images_capacity, loading_image;
|
size_t image_count, images_capacity, loading_image;
|
||||||
|
char last_init_img_action;
|
||||||
Image *images;
|
Image *images;
|
||||||
size_t count, capacity, rp_capacity;
|
size_t count, capacity, rp_capacity;
|
||||||
ImageRenderData *render_data;
|
ImageRenderData *render_data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user