jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=73670beba31486adf5fee41f36af9209c212f579

commit 73670beba31486adf5fee41f36af9209c212f579
Author: Jean-Philippe Andre <[email protected]>
Date:   Mon Jan 13 17:17:36 2014 +0900

    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.
---
 src/bin/evas/evas_cserve2_cache.c     | 15 ++++++++-------
 src/bin/evas/evas_cserve2_shm_debug.c |  6 +++---
 src/lib/evas/cserve2/evas_cs2.h       |  2 +-
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/bin/evas/evas_cserve2_cache.c 
b/src/bin/evas/evas_cserve2_cache.c
index d9f7064..0fbb1fb 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)
         if (fd)
           {
              // FIXME: Check difference with master (2 cases vs. only one)
-             if (fd->invalid || !fentry->images)
+             if (fd->changed || !fentry->images)
                eina_hash_del_by_key(file_entries, &entry->id);
           }
         else
@@ -1477,7 +1477,7 @@ _entry_reference_del(Entry *entry, Reference *ref)
           {
              File_Data *fdata = _file_data_find(idata->file_id);
 
-             if (fdata->invalid)
+             if (fdata->changed)
                _image_entry_free(ientry);
              else
                _entry_unused_push(ientry);
@@ -1596,9 +1596,10 @@ _image_entry_new(Client *client, int rid,
         return NULL;
      }
    fd = _file_data_find(ref->entry->id);
-   if (!fd || fd->invalid)
+   if (!fd || fd->changed)
      {
-        ERR("Can't find file data %d (rid %d)", ref->entry->id, rid);
+        ERR("Can't find file data %d (rid %d)%s",
+            ref->entry->id, rid, fd ? ": file changed" : "");
         cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED);
         return NULL;
      }
@@ -1707,7 +1708,7 @@ _file_changed_cb(const char *path EINA_UNUSED, Eina_Bool 
deleted EINA_UNUSED, vo
         fd = _file_data_find(fentry_id);
         if (fd)
           {
-             fd->invalid = EINA_TRUE;
+             fd->changed = EINA_TRUE;
              _file_id_free(fd);
              eina_hash_set(file_entries, &fd->id, NULL);
           }
@@ -2936,10 +2937,10 @@ cserve2_cache_image_load(Client *client, unsigned int 
client_image_id, unsigned
      }
 
    fd = _file_data_find(idata->file_id);
-   if (!fd || fd->invalid)
+   if (!fd || fd->changed)
      {
         ERR("Can't load image %d for rid %d%s", idata->file_id, rid,
-            fd->invalid ? ": invalid" : "");
+            fd ? ": file changed" : "");
         cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED);
         return;
      }
diff --git a/src/bin/evas/evas_cserve2_shm_debug.c 
b/src/bin/evas/evas_cserve2_shm_debug.c
index 73b13b3..341d8ed 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()
         if (!fd->id || !fd->refcount) continue;
 
         printf("%7d %7d %5dx%-6d %d %d %6.6s %6d %6d '%s':'%s'\n",
-               k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->invalid,
+               k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->changed,
                fd->loader_data ? _shared_string_get(fd->loader_data) : "",
                fd->path, fd->key, _shared_string_get(fd->path),
                _shared_string_get(fd->key));
@@ -444,7 +444,7 @@ _files_all_print_all(void)
                fd->animated ? "YES" : "NO",
                fd->frame_count, fd->loop_count, fd->loop_hint);
         printf("Alpha:         %s\n", fd->alpha ? "YES" : "NO");
-        printf("Invalid:       %s\n", fd->invalid ? "YES" : "NO");
+        printf("Changed:       %s\n", fd->changed ? "YES" : "NO");
 
         printf_newline(0);
      }
@@ -564,7 +564,7 @@ _images_all_print_full(void)
                     fd->animated ? "YES" : "NO",
                     fd->frame_count, fd->loop_count, fd->loop_hint);
              printf("          Alpha:         %s\n", fd->alpha ? "YES" : "NO");
-             printf("          Invalid:       %s\n", fd->invalid ? "YES" : 
"NO");
+             printf("          Changed:       %s\n", fd->changed ? "YES" : 
"NO");
           }
         else
           printf("File: ID %d not found\n", id->file_id);
diff --git a/src/lib/evas/cserve2/evas_cs2.h b/src/lib/evas/cserve2/evas_cs2.h
index a6e5994..98259ac 100644
--- a/src/lib/evas/cserve2/evas_cs2.h
+++ b/src/lib/evas/cserve2/evas_cs2.h
@@ -348,7 +348,7 @@ struct _File_Data {
    int loop_count;
    int loop_hint;
    Eina_Bool alpha : 1;
-   Eina_Bool invalid : 1;
+   Eina_Bool changed : 1;
    Eina_Bool valid : 1;
    Eina_Bool animated : 1;
 };

-- 


Reply via email to