This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gokdrive. from bc93ad9 x2gokdrive*.c: Remove unused variables (or mark them with _X_UNUSED). new f5cbefa x2gokdriveremote.c: Avoid shadowing of variables defined in higher scope. new 163a121 x2gokdrive*.c: Fix string formatting argument types. new 315a911 x2gokdrive*.c: Silence "ISO C90 forbids mixed declarations and code" warnings (2). new 35a2182 x2gokdrive.c: White-space cleanup. new 6c59ed5 x2gokdriveremote.c: Fix "return discards ‘const’ qualifier from pointer target type" compiler warning. new cab94a1 x2gokdriveremote.h: _remoteHostVars.send_thread_id needs to be of type unsigned long, not long. new 57f3fb6 x2gokdriveselection.h: create_selection_window() is static, remove prototype. new 8380ed9 x2gokdriveremote.c: Write DBG jpegs to some X2Go specific /tmp-path. new d2dad68 x2gokdrive.c: Rename RandR Output name to X2GoKdrive-0, not X2GoEphyr-0. The 9 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: x2gokdrive.c | 97 +++++++++++++++++++++++---------------------------- x2gokdriveremote.c | 37 ++++++++++---------- x2gokdriveremote.h | 2 +- x2gokdriveselection.h | 2 -- 4 files changed, 64 insertions(+), 74 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 f5cbefa01c82c982d3637f704a5f5b35f77a183f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:07:15 2019 +0200 x2gokdriveremote.c: Avoid shadowing of variables defined in higher scope. --- x2gokdriveremote.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index 8bc4329..8a98342 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -1297,12 +1297,12 @@ void sendMainImageFromSendThread(uint32_t width, uint32_t height, int32_t dx ,in pthread_mutex_lock(&remoteVars.mainimg_mutex); - for(int i=0;i<9;++i) + for(int j=0;j<9;++i) { - regions[i].rect.size.width=0; - regions[i].source_crc=0; - regions[i].compressed_data=0; - regions[i].size=0; + regions[j].rect.size.width=0; + regions[j].source_crc=0; + regions[j].compressed_data=0; + regions[j].size=0; } if(!width || (dx==0 && dy==0 && width==remoteVars.main_img_width && height==remoteVars.main_img_height)) @@ -1534,6 +1534,7 @@ void *send_frame_thread (void *threadid) struct sendqueue_element* current = NULL; uint32_t x, y = 0; int32_t width, height = 0; + uint32_t crc = 0; if(remoteVars.maxfr<elems) { @@ -1560,9 +1561,9 @@ void *send_frame_thread (void *threadid) if(frame) { - uint32_t crc = frame->crc; - uint32_t width=frame->width; - uint32_t height=frame->height; + crc = frame->crc; + width=frame->width; + height=frame->height; /* unlock sendqueue for main thread */ pthread_mutex_unlock(&remoteVars.sendqueue_mutex); @@ -1983,19 +1984,19 @@ clientReadNotify(int fd, int ready, void *data) EPHYR_DBG("Client want resize to %dx%d",width,height); memset(screens,0, sizeof(struct VirtScreen)*4); - for(int i=0;i<4;++i) + for(int j=0;j<4;++i) { char* record=buff+9+i*8; - screens[i].width=*((uint16_t*)record); - screens[i].height=*((uint16_t*)record+1); - screens[i].x=*((int16_t*)record+2); - screens[i].y=*((int16_t*)record+3); + screens[j].width=*((uint16_t*)record); + screens[j].height=*((uint16_t*)record+1); + screens[j].x=*((int16_t*)record+2); + screens[j].y=*((int16_t*)record+3); - if(!screens[i].width || !screens[i].height) + if(!screens[j].width || !screens[j].height) { break; } - EPHYR_DBG("SCREEN %d - (%dx%d) - %d,%d", i, screens[i].width, screens[i].height, screens[i].x, screens[i].y); + EPHYR_DBG("SCREEN %d - (%dx%d) - %d,%d", i, screens[j].width, screens[j].height, screens[j].x, screens[j].y); } ephyrResizeScreen (remoteVars.ephyrScreen->pScreen,width,height, screens); break; -- 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 163a121ca8d8541d29340b67fd063a2930fd43eb Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:12:47 2019 +0200 x2gokdrive*.c: Fix string formatting argument types. --- x2gokdrive.c | 2 +- x2gokdriveremote.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x2gokdrive.c b/x2gokdrive.c index 2be5bfe..c555019 100644 --- a/x2gokdrive.c +++ b/x2gokdrive.c @@ -848,7 +848,7 @@ ephyrResizeScreen (ScreenPtr pScreen, struct VirtScreen* virtualScreens) { - EPHYR_DBG("EPHYR RESIZE SCREEN!!! %x %d %d",pScreen, newwidth, newheight); + EPHYR_DBG("EPHYR RESIZE SCREEN!!! %p %d %d",pScreen, newwidth, newheight); KdScreenPriv(pScreen); EPHYR_DBG("EPHYR RESIZE SCREEN 2"); diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index 8a98342..0efe67d 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -1379,7 +1379,7 @@ void *send_frame_thread (void *threadid) errcode = getaddrinfo (remoteVars.acceptAddr, NULL, &hints, &res); if (errcode != 0 || !res) { - EPHYR_DBG ("ERROR LOOKUP %d", remoteVars.acceptAddr); + EPHYR_DBG ("ERROR LOOKUP %s", remoteVars.acceptAddr); terminateServer(-1); } if( ((struct sockaddr_in *) (res->ai_addr))->sin_addr.s_addr != remoteVars.address.sin_addr.s_addr) -- 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 315a911744638cb303b7f49ecde25ac16958a883 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:25:58 2019 +0200 x2gokdrive*.c: Silence "ISO C90 forbids mixed declarations and code" warnings (2). --- x2gokdrive.c | 71 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/x2gokdrive.c b/x2gokdrive.c index c555019..39eb9d7 100644 --- a/x2gokdrive.c +++ b/x2gokdrive.c @@ -398,12 +398,12 @@ ephyrUnsetInternalDamage(ScreenPtr pScreen) Bool ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) { + rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); + EPHYR_DBG("GET RANDR INFO START"); *rotations = RR_Rotate_All | RR_Reflect_All; - rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); - /* remove all sizes. This keep randr from changing our config */ if (pScrPriv->nSizes) { @@ -437,15 +437,26 @@ Bool ephyrRandRSetConfig(ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize) { + EphyrScrPriv oldscr = {0}; + KdScreenInfo *screen = NULL; + EphyrScrPriv *scrpriv = NULL; + Bool wasEnabled; + struct VirtScreen *virtualScreens = NULL; - EPHYR_DBG("SET RANDR CFG"); + int oldwidth, oldheight, oldmmwidth, oldmmheight; + Bool oldshadow; + int newwidth, newheight; KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - EphyrScrPriv *scrpriv = screen->driver; - Bool wasEnabled = pScreenPriv->enabled; - struct VirtScreen* virtualScreens=scrpriv->virtualScreens; + rrScrPrivPtr pScrPriv = {0}; + + EPHYR_DBG("SET RANDR CFG"); + + screen = pScreenPriv->screen; + scrpriv = screen->driver; + wasEnabled = pScreenPriv->enabled; + virtualScreens=scrpriv->virtualScreens; if(!scrpriv->localRandrCall) { @@ -455,16 +466,9 @@ ephyrRandRSetConfig(ScreenPtr pScreen, scrpriv->localRandrCall=FALSE; - EPHYR_DBG("Trying to get virtual screens"); EPHYR_DBG("Virtual Screens: %p", scrpriv->virtualScreens); - - EphyrScrPriv oldscr; - int oldwidth, oldheight, oldmmwidth, oldmmheight; - Bool oldshadow; - int newwidth, newheight; - if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) { newwidth = pSize->width; newheight = pSize->height; @@ -557,16 +561,12 @@ ephyrRandRSetConfig(ScreenPtr pScreen, if (wasEnabled) KdEnableScreen(pScreen); - - - - rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); + pScrPriv = rrGetScrPriv(pScreen); EPHYR_DBG("RANDR SET CONFIG, LET'S CHECK OUR RANDR SETTINGS"); /*EPHYR_DBG("OUTPUTS: %d, CRTCS: %d, SIZES: %d, MODES %d" , pScrPriv->numOutputs, pScrPriv->numCrtcs, pScrPriv->nSizes, pScrPriv->outputs[0]->numModes);*/ - if (pScrPriv->nSizes) { free(pScrPriv->pSizes); @@ -671,9 +671,14 @@ ephyrRandRSetConfig(ScreenPtr pScreen, void setOutput(ScreenPtr pScreen, RROutputPtr output, RRCrtcPtr crtc, int width, int height, int x, int y, BOOL primary, BOOL connected) { + RRModePtr mode = NULL; + xRRModeInfo modeInfo = {0}; + RRModePtr *modes = NULL; + char modename[56] = {0}; - EPHYR_DBG("Set output %d %d %d %d", width, height, x,y); rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); + + EPHYR_DBG("Set output %d %d %d %d", width, height, x,y); crtc->x=x; crtc->y=y; if(connected) @@ -681,14 +686,8 @@ void setOutput(ScreenPtr pScreen, RROutputPtr output, RRCrtcPtr crtc, int width, else RROutputSetConnection(output, RR_Disconnected); - RRModePtr mode = NULL; - - xRRModeInfo modeInfo; - RRModePtr *modes; - memset(&modeInfo, '\0', sizeof(modeInfo)); - char modename[56]; snprintf(modename, sizeof(modename), "%dx%d", width, height); modeInfo.width = width; @@ -776,7 +775,8 @@ void updateOutput(ScreenPtr pScreen, RROutputPtr output, int width, int height, void addOutput(ScreenPtr pScreen, char* name, int width, int height, int x, int y, BOOL primary, BOOL connected) { - RROutputPtr output; + RROutputPtr output = {0}; + RRCrtcPtr crtc = {0}; /* add new Output */ EPHYR_DBG("CREATE OUTPUT %s",name); @@ -786,7 +786,6 @@ void addOutput(ScreenPtr pScreen, char* name, int width, int height, int x, int EPHYR_DBG("Can't create output %s", name); terminateServer(-1); } - RRCrtcPtr crtc; crtc = RRCrtcCreate(pScreen, NULL); if (!crtc) @@ -847,19 +846,23 @@ ephyrResizeScreen (ScreenPtr pScreen, int newheight, struct VirtScreen* virtualScreens) { + KdScreenInfo *screen = NULL; + EphyrScrPriv *scrpriv = NULL; + + KdScreenPriv(pScreen); + + RRScreenSize size = {0}; + Bool ret; + int t; EPHYR_DBG("EPHYR RESIZE SCREEN!!! %p %d %d",pScreen, newwidth, newheight); - KdScreenPriv(pScreen); EPHYR_DBG("EPHYR RESIZE SCREEN 2"); - KdScreenInfo *screen = pScreenPriv->screen; - EphyrScrPriv *scrpriv = screen->driver; + screen = pScreenPriv->screen; + scrpriv = screen->driver; scrpriv->virtualScreens=virtualScreens; EPHYR_DBG("Virtual Screens: %p", scrpriv->virtualScreens); - RRScreenSize size = {0}; - Bool ret; - int t; if (screen->randr & (RR_Rotate_90|RR_Rotate_270)) { t = newwidth; -- 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 35a2182a4f00be20779b78ca539df0cc3f1af8ee Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:26:11 2019 +0200 x2gokdrive.c: White-space cleanup. --- x2gokdrive.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/x2gokdrive.c b/x2gokdrive.c index 39eb9d7..c2b871d 100644 --- a/x2gokdrive.c +++ b/x2gokdrive.c @@ -517,9 +517,6 @@ ephyrRandRSetConfig(ScreenPtr pScreen, if (!ephyrMapFramebuffer(screen)) goto bail4; - - - /* FIXME below should go in own call */ if (oldshadow) @@ -535,12 +532,14 @@ ephyrRandRSetConfig(ScreenPtr pScreen, goto bail4; } else { + /* Without shadow fb ( non rotated ) we need * to use damage to efficiently update display * via signal regions what to copy from 'fb'. */ if (!ephyrSetInternalDamage(screen->pScreen)) goto bail4; + } /* @@ -584,7 +583,6 @@ ephyrRandRSetConfig(ScreenPtr pScreen, // // EPHYR_DBG("new size registered"); - randr = KdSubRotation(scrpriv->randr, screen->randr); EPHYR_DBG("Sub Rotation done"); @@ -634,14 +632,11 @@ ephyrRandRSetConfig(ScreenPtr pScreen, } } - - // RRSetCurrentConfig(pScreen, randr, 0, pSize); RRScreenSetSizeRange(pScreen, screen->width, screen->height, screen->width, screen->height); RRScreenSizeNotify(pScreen); RRSendConfigNotify(pScreen); - // EPHYR_DBG("OUTPUTS: %d, CRTCS: %d, SIZES: %d, MODES %d" , pScrPriv->numOutputs, // pScrPriv->numCrtcs, pScrPriv->nSizes, pScrPriv->outputs[0]->numModes); @@ -652,7 +647,7 @@ ephyrRandRSetConfig(ScreenPtr pScreen, return TRUE; - bail4: +bail4: EPHYR_LOG("bailed"); ephyrUnmapFramebuffer(screen); @@ -699,7 +694,6 @@ void setOutput(ScreenPtr pScreen, RROutputPtr output, RRCrtcPtr crtc, int width, modeInfo.nameLength = strlen(modename); mode = RRModeGet(&modeInfo, modename); - if (!mode) { EPHYR_DBG("can't create mode %s",modename); @@ -724,8 +718,6 @@ void setOutput(ScreenPtr pScreen, RROutputPtr output, RRCrtcPtr crtc, int width, // output->numPreferred=0; - - RROutputSetPhysicalSize(output, width*pScreen->mmWidth/pScreen->width, height*pScreen->mmHeight/pScreen->height); EPHYR_DBG("RANDR SIZES - SCREEN %dx%d - %dx%d, OUTPUT %dx%d - %dx%d", pScreen->width, pScreen->height, pScreen->mmWidth, pScreen->mmHeight, width, height, @@ -765,7 +757,6 @@ void updateOutput(ScreenPtr pScreen, RROutputPtr output, int width, int height, terminateServer(-1); } - setOutput(pScreen, output, output->crtcs[0], width, height, x, y, primary, connected); } @@ -799,8 +790,6 @@ void addOutput(ScreenPtr pScreen, char* name, int width, int height, int x, int setOutput(pScreen, output, crtc, width, height, x, y, primary, connected); } - - Bool ephyrRandRInit(ScreenPtr pScreen) { @@ -877,7 +866,6 @@ ephyrResizeScreen (ScreenPtr pScreen, size.width = newwidth; size.height = newheight; - scrpriv->localRandrCall=TRUE; ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size ); // if (ret) { -- 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 6c59ed5431d6cbdbb3f006c90f1b7fa2e69ca3ad Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:29:33 2019 +0200 x2gokdriveremote.c: Fix "return discards ‘const’ qualifier from pointer target type" compiler warning. --- x2gokdriveremote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index 0efe67d..b62fc51 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -1744,7 +1744,7 @@ void clear_cache_data(uint32_t maxsize) } static -char* getAgentStateAsString(int state) +const char* getAgentStateAsString(int state) { switch(state) { -- 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 cab94a149edbb99bac9817a194dbb5748b1e7707 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:33:48 2019 +0200 x2gokdriveremote.h: _remoteHostVars.send_thread_id needs to be of type unsigned long, not long. --- x2gokdriveremote.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2gokdriveremote.h b/x2gokdriveremote.h index df84661..a97d486 100644 --- a/x2gokdriveremote.h +++ b/x2gokdriveremote.h @@ -314,7 +314,7 @@ struct RemoteHostVars char eventBuffer[EVLENGTH*100]; uint32_t evBufferOffset; - long send_thread_id; + unsigned long send_thread_id; //for control uint32_t cache_elements; -- 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 57f3fb658797d5b49f9a8cda61fda13a6282f5ea Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:34:34 2019 +0200 x2gokdriveselection.h: create_selection_window() is static, remove prototype. --- x2gokdriveselection.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/x2gokdriveselection.h b/x2gokdriveselection.h index 2841cb9..829cad2 100644 --- a/x2gokdriveselection.h +++ b/x2gokdriveselection.h @@ -31,8 +31,6 @@ void selection_init( struct RemoteHostVars* obj); void install_selection_callbacks(void ); -static int create_selection_window(void); int own_selection(int target); - #endif /* X2GOKDRIVESELECTION_H */ -- 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 8380ed92254a4c0e1db618dc37fe9a3b78bd2cee Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:42:04 2019 +0200 x2gokdriveremote.c: Write DBG jpegs to some X2Go specific /tmp-path. --- x2gokdriveremote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index b62fc51..da77595 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -2828,7 +2828,7 @@ void initFrameRegions(struct cache_elem* frame) regions[1].rect.size.width*CACHEBPP); } - sprintf(fname,"/tmp/ephyrdbg/%x-rect_inv.jpg",frame->crc); + sprintf(fname,"/tmp/.x2go/x2gokdrive_dbg/%x-rect_inv.jpg",frame->crc); regions[1].compressed_data=image_compress(regions[1].rect.size.width, regions[1].rect.size.height, data, ®ions[1].size, CACHEBPP, fname); -- 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 d2dad68bdc9370bb91ecc06af37eaf309189d465 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jul 16 23:42:35 2019 +0200 x2gokdrive.c: Rename RandR Output name to X2GoKdrive-0, not X2GoEphyr-0. --- x2gokdrive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x2gokdrive.c b/x2gokdrive.c index c2b871d..46e7d89 100644 --- a/x2gokdrive.c +++ b/x2gokdrive.c @@ -617,8 +617,8 @@ ephyrRandRSetConfig(ScreenPtr pScreen, } else { - char name[]="X2GoEphyr-x"; - sprintf(name, "X2GoEphyr-%d",i); + char name[]="X2GoKdrive-x"; + sprintf(name, "X2GoKdrive-%d",i); addOutput(pScreen, name,virtualScreens[i].width, virtualScreens[i].height, virtualScreens[i].x, virtualScreens[i].y, virtualScreens[i].isPrimary, TRUE); @@ -823,7 +823,7 @@ ephyrRandRInit(ScreenPtr pScreen) RRSetCurrentConfig(pScreen, randr, 0, pSize); - addOutput(pScreen,"X2GoEphyr-0", screen->width, screen->height, 0,0, TRUE, TRUE); + addOutput(pScreen,"X2GoKdrive-0", screen->width, screen->height, 0,0, TRUE, TRUE); return TRUE; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git