summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2/evas_cs2_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/cserve2/evas_cs2_client.c')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 30845501f5..5ebd35c7e8 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -446,7 +446,10 @@ _loaded_handle(Image_Entry *ie, const Msg_Loaded *msg, int size)
446 shmpath = ((const char *)msg) + sizeof(*msg); 446 shmpath = ((const char *)msg) + sizeof(*msg);
447 if ((size < (int) sizeof(*msg) + 1) 447 if ((size < (int) sizeof(*msg) + 1)
448 || (strnlen(shmpath, size - sizeof(*msg)) >= (size - sizeof(*msg)))) 448 || (strnlen(shmpath, size - sizeof(*msg)) >= (size - sizeof(*msg))))
449 goto fail; 449 {
450 DBG("invalid message size");
451 goto fail;
452 }
450 453
451 // dentry->shm.path = strdup(shmpath); 454 // dentry->shm.path = strdup(shmpath);
452 dentry->shm.mmap_offset = msg->shm.mmap_offset; 455 dentry->shm.mmap_offset = msg->shm.mmap_offset;
@@ -456,7 +459,10 @@ _loaded_handle(Image_Entry *ie, const Msg_Loaded *msg, int size)
456 459
457 dentry->shm.f = eina_file_open(shmpath, EINA_TRUE); 460 dentry->shm.f = eina_file_open(shmpath, EINA_TRUE);
458 if (!dentry->shm.f) 461 if (!dentry->shm.f)
459 goto fail; 462 {
463 DBG("could not open the shm file: %d %m", errno);
464 goto fail;
465 }
460 466
461 dentry->shm.data = eina_file_map_new(dentry->shm.f, EINA_FILE_WILLNEED, 467 dentry->shm.data = eina_file_map_new(dentry->shm.f, EINA_FILE_WILLNEED,
462 dentry->shm.mmap_offset, 468 dentry->shm.mmap_offset,
@@ -464,6 +470,7 @@ _loaded_handle(Image_Entry *ie, const Msg_Loaded *msg, int size)
464 470
465 if (!dentry->shm.data) 471 if (!dentry->shm.data)
466 { 472 {
473 DBG("could not mmap the shm file: %d %m", errno);
467 eina_file_close(dentry->shm.f); 474 eina_file_close(dentry->shm.f);
468 goto fail; 475 goto fail;
469 } 476 }