summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-03-18 12:11:35 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-03-18 13:49:05 +0900
commit320a9f18c55e3e281b374eb757e22a065d911c09 (patch)
tree15b2d1c215d9fb6e6abe567a70d1e889c564ba1c /src/lib/evas/cserve2
parentff2d598b029bec988b4c2ac5fbeeee1f80700335 (diff)
Evas cserve2: Fix client crashes when a file changed
Clients must ignore changed file entries as they are not valid anymore. The server will also mark the entry as invalid in case of file update. @fix
Diffstat (limited to '')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 2476e915ad..d532644113 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -2735,7 +2735,9 @@ _shared_image_entry_file_data_find(Image_Entry *ie)
2735 if (fe->server_file_id) 2735 if (fe->server_file_id)
2736 { 2736 {
2737 if ((fdata = _shared_file_data_get_by_id(fe->server_file_id)) != NULL) 2737 if ((fdata = _shared_file_data_get_by_id(fe->server_file_id)) != NULL)
2738 return fdata; 2738 if (!fdata->changed)
2739 return fdata;
2740 fe->server_file_id = 0;
2739 } 2741 }
2740 2742
2741 // Check hash 2743 // Check hash
@@ -2757,6 +2759,7 @@ _shared_image_entry_file_data_find(Image_Entry *ie)
2757 fd = &(_index.files.entries.filedata[k]); 2759 fd = &(_index.files.entries.filedata[k]);
2758 if (!fd->id) break; 2760 if (!fd->id) break;
2759 if (!fd->refcount) continue; 2761 if (!fd->refcount) continue;
2762 if (fd->changed) continue;
2760 2763
2761 key = _shared_string_safe_get(fd->key); 2764 key = _shared_string_safe_get(fd->key);
2762 file = _shared_string_safe_get(fd->path); 2765 file = _shared_string_safe_get(fd->path);
@@ -3097,6 +3100,7 @@ _shared_image_entry_image_data_find(Image_Entry *ie)
3097 continue; 3100 continue;
3098 } 3101 }
3099 3102
3103 if (fd->changed || !fd->valid) continue;
3100 key = _shared_string_safe_get(fd->key); 3104 key = _shared_string_safe_get(fd->key);
3101 file = _shared_string_safe_get(fd->path); 3105 file = _shared_string_safe_get(fd->path);
3102 if (!file) 3106 if (!file)