summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-01-13 17:17:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-01-14 14:23:05 +0900
commit73670beba31486adf5fee41f36af9209c212f579 (patch)
treef8de4401f18cc2663b12bb6bd8a366e30764746a /src/bin
parent1d99c82381043d9bf2670e5261bdf157d478b75b (diff)
Evas/cserve2: Rename "invalid" field to "changed"
This flag indicates that a file changed, not that the entry is invalid. There is another "valid" flag already.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c15
-rw-r--r--src/bin/evas/evas_cserve2_shm_debug.c6
2 files changed, 11 insertions, 10 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index d9f7064804..0fbb1fbc2e 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -1458,7 +1458,7 @@ _entry_reference_del(Entry *entry, Reference *ref)
1458 if (fd) 1458 if (fd)
1459 { 1459 {
1460 // FIXME: Check difference with master (2 cases vs. only one) 1460 // FIXME: Check difference with master (2 cases vs. only one)
1461 if (fd->invalid || !fentry->images) 1461 if (fd->changed || !fentry->images)
1462 eina_hash_del_by_key(file_entries, &entry->id); 1462 eina_hash_del_by_key(file_entries, &entry->id);
1463 } 1463 }
1464 else 1464 else
@@ -1477,7 +1477,7 @@ _entry_reference_del(Entry *entry, Reference *ref)
1477 { 1477 {
1478 File_Data *fdata = _file_data_find(idata->file_id); 1478 File_Data *fdata = _file_data_find(idata->file_id);
1479 1479
1480 if (fdata->invalid) 1480 if (fdata->changed)
1481 _image_entry_free(ientry); 1481 _image_entry_free(ientry);
1482 else 1482 else
1483 _entry_unused_push(ientry); 1483 _entry_unused_push(ientry);
@@ -1596,9 +1596,10 @@ _image_entry_new(Client *client, int rid,
1596 return NULL; 1596 return NULL;
1597 } 1597 }
1598 fd = _file_data_find(ref->entry->id); 1598 fd = _file_data_find(ref->entry->id);
1599 if (!fd || fd->invalid) 1599 if (!fd || fd->changed)
1600 { 1600 {
1601 ERR("Can't find file data %d (rid %d)", ref->entry->id, rid); 1601 ERR("Can't find file data %d (rid %d)%s",
1602 ref->entry->id, rid, fd ? ": file changed" : "");
1602 cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED); 1603 cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED);
1603 return NULL; 1604 return NULL;
1604 } 1605 }
@@ -1707,7 +1708,7 @@ _file_changed_cb(const char *path EINA_UNUSED, Eina_Bool deleted EINA_UNUSED, vo
1707 fd = _file_data_find(fentry_id); 1708 fd = _file_data_find(fentry_id);
1708 if (fd) 1709 if (fd)
1709 { 1710 {
1710 fd->invalid = EINA_TRUE; 1711 fd->changed = EINA_TRUE;
1711 _file_id_free(fd); 1712 _file_id_free(fd);
1712 eina_hash_set(file_entries, &fd->id, NULL); 1713 eina_hash_set(file_entries, &fd->id, NULL);
1713 } 1714 }
@@ -2936,10 +2937,10 @@ cserve2_cache_image_load(Client *client, unsigned int client_image_id, unsigned
2936 } 2937 }
2937 2938
2938 fd = _file_data_find(idata->file_id); 2939 fd = _file_data_find(idata->file_id);
2939 if (!fd || fd->invalid) 2940 if (!fd || fd->changed)
2940 { 2941 {
2941 ERR("Can't load image %d for rid %d%s", idata->file_id, rid, 2942 ERR("Can't load image %d for rid %d%s", idata->file_id, rid,
2942 fd->invalid ? ": invalid" : ""); 2943 fd ? ": file changed" : "");
2943 cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED); 2944 cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED);
2944 return; 2945 return;
2945 } 2946 }
diff --git a/src/bin/evas/evas_cserve2_shm_debug.c b/src/bin/evas/evas_cserve2_shm_debug.c
index 73b13b3e78..341d8edd9f 100644
--- a/src/bin/evas/evas_cserve2_shm_debug.c
+++ b/src/bin/evas/evas_cserve2_shm_debug.c
@@ -399,7 +399,7 @@ _files_all_print_short()
399 if (!fd->id || !fd->refcount) continue; 399 if (!fd->id || !fd->refcount) continue;
400 400
401 printf("%7d %7d %5dx%-6d %d %d %6.6s %6d %6d '%s':'%s'\n", 401 printf("%7d %7d %5dx%-6d %d %d %6.6s %6d %6d '%s':'%s'\n",
402 k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->invalid, 402 k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->changed,
403 fd->loader_data ? _shared_string_get(fd->loader_data) : "", 403 fd->loader_data ? _shared_string_get(fd->loader_data) : "",
404 fd->path, fd->key, _shared_string_get(fd->path), 404 fd->path, fd->key, _shared_string_get(fd->path),
405 _shared_string_get(fd->key)); 405 _shared_string_get(fd->key));
@@ -444,7 +444,7 @@ _files_all_print_all(void)
444 fd->animated ? "YES" : "NO", 444 fd->animated ? "YES" : "NO",
445 fd->frame_count, fd->loop_count, fd->loop_hint); 445 fd->frame_count, fd->loop_count, fd->loop_hint);
446 printf("Alpha: %s\n", fd->alpha ? "YES" : "NO"); 446 printf("Alpha: %s\n", fd->alpha ? "YES" : "NO");
447 printf("Invalid: %s\n", fd->invalid ? "YES" : "NO"); 447 printf("Changed: %s\n", fd->changed ? "YES" : "NO");
448 448
449 printf_newline(0); 449 printf_newline(0);
450 } 450 }
@@ -564,7 +564,7 @@ _images_all_print_full(void)
564 fd->animated ? "YES" : "NO", 564 fd->animated ? "YES" : "NO",
565 fd->frame_count, fd->loop_count, fd->loop_hint); 565 fd->frame_count, fd->loop_count, fd->loop_hint);
566 printf(" Alpha: %s\n", fd->alpha ? "YES" : "NO"); 566 printf(" Alpha: %s\n", fd->alpha ? "YES" : "NO");
567 printf(" Invalid: %s\n", fd->invalid ? "YES" : "NO"); 567 printf(" Changed: %s\n", fd->changed ? "YES" : "NO");
568 } 568 }
569 else 569 else
570 printf("File: ID %d not found\n", id->file_id); 570 printf("File: ID %d not found\n", id->file_id);