summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-10-02 20:23:14 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:16 +0900
commite74cac57e412bcd71f2cc58ba46d326aef0996c4 (patch)
tree3ef14985f93e18bbb642aa537562e648ba01e77b /src/bin
parent3889feca24ad3dba2aead16261a6b8dde0687b57 (diff)
evas/cserve2: Reconnect to cserve2 in case of server crash
Try to reconnect to cserve2 if the socket connection was lost. Resend some messages if necessary. Images reload seems to be working. Actually, the images don't change over time, so the clients just keep the previous references to their images. FONT RELOAD IS NOT WORKING: - Crashes - Invalid glyph data - Infinite loop in _glyph_map_remap_check() Root cause: When new glyphs are requested from the server, they are added to the mempool. So it is necessary to remap the font. Unfortunately, in case of server reboot, we did not keep the mempool so the old glyphs that were not requested again will not be valid.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index 8b4e5659ca..5ec597bc49 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -2769,6 +2769,7 @@ try_again:
2769 0, &unscaled, buf, sizeof(buf)); 2769 0, &unscaled, buf, sizeof(buf));
2770 if (!orig_entry) return -1; 2770 if (!orig_entry) return -1;
2771 2771
2772 image_id = orig_entry->base.id;
2772 orig_data = _image_data_find(ENTRYID(orig_entry)); 2773 orig_data = _image_data_find(ENTRYID(orig_entry));
2773 orig_data->unused = EINA_TRUE; 2774 orig_data->unused = EINA_TRUE;
2774 fentry = _file_entry_find(orig_data->file_id); 2775 fentry = _file_entry_find(orig_data->file_id);
@@ -2914,12 +2915,17 @@ cserve2_cache_image_load(Client *client, unsigned int client_image_id, unsigned
2914 { 2915 {
2915 ERR("Can't load: client %d has no image id %d", 2916 ERR("Can't load: client %d has no image id %d",
2916 client->id, client_image_id); 2917 client->id, client_image_id);
2918 cserve2_client_error_send(client, rid, CSERVE2_NOT_LOADED);
2917 return; 2919 return;
2918 } 2920 }
2919 2921
2920 ientry = (Image_Entry *) ref->entry; 2922 ientry = (Image_Entry *) ref->entry;
2921 idata = _image_data_find(ENTRYID(ientry)); 2923 idata = _image_data_find(ENTRYID(ientry));
2922 if (!idata) return; 2924 if (!idata)
2925 {
2926 cserve2_client_error_send(client, rid, CSERVE2_INVALID_CACHE);
2927 return;
2928 }
2923 2929
2924 fd = _file_data_find(idata->file_id); 2930 fd = _file_data_find(idata->file_id);
2925 if (!fd || fd->invalid) 2931 if (!fd || fd->invalid)
@@ -3120,6 +3126,7 @@ cserve2_cache_font_glyphs_load(Client *client, const char *source,
3120 if (!req) 3126 if (!req)
3121 { 3127 {
3122 free(glyphs); 3128 free(glyphs);
3129 cserve2_client_error_send(client, rid, CSERVE2_NOT_LOADED);
3123 return -1; 3130 return -1;
3124 } 3131 }
3125 3132
@@ -3153,6 +3160,7 @@ cserve2_cache_font_glyphs_used(Client *client, const char *source,
3153 if (!req) 3160 if (!req)
3154 { 3161 {
3155 free(glyphs); 3162 free(glyphs);
3163 cserve2_client_error_send(client, rid, CSERVE2_NOT_LOADED);
3156 return 0; 3164 return 0;
3157 } 3165 }
3158 3166