This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gokdrive. from 76971de reiniting of frame and cursors caches by client request. new 80a1e36 don't check cache data size, only amount of elements. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 1 + x2gokdriveremote.c | 32 -------------------------------- x2gokdriveremote.h | 2 -- 3 files changed, 1 insertion(+), 34 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gokdrive. commit 80a1e366e7c74ff9d64f44ad17a3f612849e59fb Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Thu Oct 14 14:53:27 2021 -0500 don't check cache data size, only amount of elements. --- debian/changelog | 1 + x2gokdriveremote.c | 32 -------------------------------- x2gokdriveremote.h | 2 -- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1a4a4b2..1fafbb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,7 @@ x2gokdrive (0.0.0.1-0x2go1) UNRELEASED; urgency=medium - improve initialization of cursor frame and cache element structures. - improve clearing of the frame list. - reiniting of frame and cursors caches by client request. + - don't check cache data size, only amount of elements. [ Mihai Moldovan ] * Initial release: diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index 67df1c3..e70ec89 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -1637,11 +1637,6 @@ void *send_frame_thread (void *threadid) } } - - if(remoteVars.cache_size>CACHEMAXSIZE) - { - clear_cache_data(CACHEMAXSIZE); - } if(remoteVars.cache_size>CACHEMAXELEMENTS) { clear_frame_cache(CACHEMAXELEMENTS); @@ -1779,33 +1774,6 @@ void clear_frame_cache(uint32_t max_elements) // EPHYR_DBG("cache elements %d, cache size %d\n", cache_elements, cache_size); } -/* - * only release images, keep the older frames for crc check * - */ -void clear_cache_data(uint32_t maxsize) -{ - struct cache_elem* cur=remoteVars.first_cache_element; - while(cur && remoteVars.cache_size>maxsize) - { - struct cache_elem* next = NULL; - - /* don't delete it now, return to it later */ - if(cur->busy) - { - EPHYR_DBG("%x - busy (%d)", cur->crc, cur->busy); - return; - } - next=cur->next; - if(cur->size) - { - free(cur->data); - remoteVars.cache_size-=cur->size; - cur->size=0; - cur->data=0; - } - cur=next; - } -} static const char* getAgentStateAsString(int state) diff --git a/x2gokdriveremote.h b/x2gokdriveremote.h index 62af332..e445837 100644 --- a/x2gokdriveremote.h +++ b/x2gokdriveremote.h @@ -138,7 +138,6 @@ enum OS_VERSION{OS_LINUX, OS_WINDOWS, OS_DARWIN, WEB}; #define CACHEBPP 3 -#define CACHEMAXSIZE 50*1024*1024 //50MB #define CACHEMAXELEMENTS 200 //store max 200 elements in cache //Events @@ -448,7 +447,6 @@ void readInputSelectionHeader(char* buff); #if XORG_VERSION_CURRENT < 11900000 void pollEvents(void); #endif /* XORG_VERSION_CURRENT */ -void clear_cache_data(uint32_t maxsize); void clear_frame_cache(uint32_t max_elements); uint32_t calculate_crc(uint32_t width, uint32_t height, int32_t dx, int32_t dy); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git