summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-07-24 18:17:52 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:13 +0900
commitee74562bf00d7cc7949489c0d9b8e9a0c61fa1a0 (patch)
treebda69f618ed5c04cccb089de6dc9ba10866f8bd1 /src/bin
parent64e7d48296a7f21245203ea9bada0be90dbf360a (diff)
evas/cserve2: Simplify error logs
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index b8a55c9592..cfb049fa87 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -295,7 +295,10 @@ _file_entry_find(unsigned int entry_id)
295 295
296 e = (Entry *) eina_hash_find(file_entries, &entry_id); 296 e = (Entry *) eina_hash_find(file_entries, &entry_id);
297 if (!e || e->type != CSERVE2_IMAGE_FILE) 297 if (!e || e->type != CSERVE2_IMAGE_FILE)
298 return NULL; 298 {
299 ERR("Could not find file entry %u", entry_id);
300 return NULL;
301 }
299 302
300 return (File_Entry *) e; 303 return (File_Entry *) e;
301} 304}
@@ -325,7 +328,10 @@ _image_entry_find(unsigned int entry_id)
325 328
326 e = (Entry *) eina_hash_find(image_entries, &entry_id); 329 e = (Entry *) eina_hash_find(image_entries, &entry_id);
327 if (!e || e->type != CSERVE2_IMAGE_DATA) 330 if (!e || e->type != CSERVE2_IMAGE_DATA)
328 return NULL; 331 {
332 ERR("Could not find image entry %u", entry_id);
333 return NULL;
334 }
329 335
330 return (Image_Entry *) e; 336 return (Image_Entry *) e;
331} 337}
@@ -595,11 +601,7 @@ _load_request_build(Image_Entry *ientry, int *bufsize)
595 Image_Data *idata; 601 Image_Data *idata;
596 602
597 idata = _image_data_find(ENTRYID(ientry)); 603 idata = _image_data_find(ENTRYID(ientry));
598 if (!idata || !idata->refcount) 604 if (!idata) return NULL;
599 {
600 ERR("Image data not found for entry %u", ENTRYID(ientry));
601 return NULL;
602 }
603 605
604 fd = _file_data_find(idata->file_id); 606 fd = _file_data_find(idata->file_id);
605 if (!fd) 607 if (!fd)
@@ -762,11 +764,7 @@ _load_request_response(Image_Entry *ientry,
762 Image_Data *idata; 764 Image_Data *idata;
763 765
764 idata = _image_data_find(ENTRYID(ientry)); 766 idata = _image_data_find(ENTRYID(ientry));
765 if (!idata) 767 if (!idata) return NULL;
766 {
767 ERR("Image data %u not found", ENTRYID(ientry));
768 return NULL;
769 }
770 768
771 _entry_load_finish(ASENTRY(ientry)); 769 _entry_load_finish(ASENTRY(ientry));
772 ASENTRY(ientry)->request = NULL; 770 ASENTRY(ientry)->request = NULL;
@@ -1195,6 +1193,7 @@ _entry_unused_push(Image_Entry *ientry)
1195 int size; 1193 int size;
1196 1194
1197 idata = _image_data_find(ENTRYID(ientry)); 1195 idata = _image_data_find(ENTRYID(ientry));
1196 if (!idata) return;
1198 1197
1199 size = _image_entry_size_get(ientry); 1198 size = _image_entry_size_get(ientry);
1200 if ((size > max_unused_mem_usage) || !(idata->doload)) 1199 if ((size > max_unused_mem_usage) || !(idata->doload))
@@ -1453,11 +1452,7 @@ _file_changed_cb(const char *path EINA_UNUSED, Eina_Bool deleted EINA_UNUSED, vo
1453 1452
1454 fd->invalid = EINA_TRUE; 1453 fd->invalid = EINA_TRUE;
1455 fentry = _file_entry_find(fd->id); 1454 fentry = _file_entry_find(fd->id);
1456 if (!fentry) 1455 if (!fentry) continue;
1457 {
1458 ERR("Could not find file entry for id %u", fd->id);
1459 continue;
1460 }
1461 1456
1462 fentry->watcher = NULL; 1457 fentry->watcher = NULL;
1463 1458
@@ -1478,7 +1473,6 @@ _file_changed_cb(const char *path EINA_UNUSED, Eina_Bool deleted EINA_UNUSED, vo
1478 if (idata->unused) 1473 if (idata->unused)
1479 _image_entry_free(ie); 1474 _image_entry_free(ie);
1480 } 1475 }
1481 else ERR("Image data %u not found", ENTRYID(ie));
1482 } 1476 }
1483 1477
1484 _file_id_free(fd); 1478 _file_id_free(fd);
@@ -2095,6 +2089,7 @@ _image_data_entry_stats_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EI
2095 File_Data *fd; 2089 File_Data *fd;
2096 2090
2097 idata = _image_data_find(ENTRYID(ientry)); 2091 idata = _image_data_find(ENTRYID(ientry));
2092 if (!idata) return EINA_TRUE;
2098 2093
2099 // accounting numbers 2094 // accounting numbers
2100 msg->images.images_loaded++; 2095 msg->images.images_loaded++;
@@ -2501,11 +2496,12 @@ _cserve2_cache_fast_scaling_check(Client *client, Image_Entry *ientry)
2501 File_Entry *fentry; 2496 File_Entry *fentry;
2502 Image_Data *idata; 2497 Image_Data *idata;
2503 2498
2504#warning NOT IMPLEMENTED. PLEASE REIMLPEMENT.
2505 return -1; 2499 return -1;
2506#if 0 2500#if 0
2501 if (!ientry) return -1;
2507 2502
2508 if (!ientry || !idata) return -1; 2503 idata = _image_data_find(ENTRYID(ientry));
2504 if (!idata) return -1;
2509 2505
2510 dst_w = entry->opts.scale_load.dst_w; 2506 dst_w = entry->opts.scale_load.dst_w;
2511 dst_h = entry->opts.scale_load.dst_h; 2507 dst_h = entry->opts.scale_load.dst_h;
@@ -2726,11 +2722,7 @@ cserve2_cache_image_load(Client *client, unsigned int client_image_id, unsigned
2726 2722
2727 ientry = (Image_Entry *) ref->entry; 2723 ientry = (Image_Entry *) ref->entry;
2728 idata = _image_data_find(ENTRYID(ientry)); 2724 idata = _image_data_find(ENTRYID(ientry));
2729 if (!idata) 2725 if (!idata) return;
2730 {
2731 ERR("Image data not found for entry %u", ENTRYID(ientry));
2732 return;
2733 }
2734 2726
2735 fd = _file_data_find(idata->file_id); 2727 fd = _file_data_find(idata->file_id);
2736 if (!fd || fd->invalid) 2728 if (!fd || fd->invalid)