This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gokdrive. commit c56dcdef90ec0f2ecd13cad448fbef4b1f57de46 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Fri Jun 11 10:14:35 2021 -0500 add name of the thread to the debug output. --- debian/changelog | 1 + x2gokdriveremote.c | 4 +--- x2gokdriveremote.h | 10 +++++++++- x2gokdriveselection.c | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7bff2ec..c15f816 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ x2gokdrive (0.0.0.1-0x2go1) UNRELEASED; urgency=medium - add some support for HTML5 client (like converting pointer cursors to PNG format). - fix crashing if client is sending unrequested selection. - extended clipboard support for HTML client. + - add name of the thread to the debug output. [ Mihai Moldovan ] * Initial release: diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index e405a04..501ecfe 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -1436,11 +1436,9 @@ void sendMainImageFromSendThread(uint32_t width, uint32_t height, int32_t dx ,in static void *send_frame_thread (void *threadid) { - long tid; enum SelectionType r; - tid = (long)threadid; - EPHYR_DBG("Started sending thread: #%ld!\n", tid); + debug_sendThreadId=pthread_self(); while (1) { diff --git a/x2gokdriveremote.h b/x2gokdriveremote.h index 8bb7a58..dc8f4b0 100644 --- a/x2gokdriveremote.h +++ b/x2gokdriveremote.h @@ -107,7 +107,12 @@ #if (EPHYR_WANT_DEBUG) #define EPHYR_DBG(x, a...) \ -fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a) +if(pthread_self()==debug_sendThreadId)\ +fprintf(stderr,"SEND:"__FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a);\ +else if (pthread_self()==debug_selectThreadId)\ +fprintf(stderr,"SEL:"__FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a);\ +else \ +fprintf(stderr,"MAIN:"__FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a) #else #define EPHYR_DBG(x, a...) do {} while (0) #endif @@ -445,6 +450,9 @@ struct _remoteHostVars struct SelectionStructure selstruct; } ; +unsigned long long int debug_sendThreadId; +unsigned long long int debug_selectThreadId; + int send_selection_chunk(int sel, unsigned char* data, uint32_t length, uint32_t format, BOOL first, BOOL last, uint32_t compressed, uint32_t total); int send_output_selection(struct OutputChunk* chunk); diff --git a/x2gokdriveselection.c b/x2gokdriveselection.c index b2122d6..d996320 100644 --- a/x2gokdriveselection.c +++ b/x2gokdriveselection.c @@ -931,6 +931,7 @@ void *selection_thread (void* id) xcb_xfixes_query_version_cookie_t xfixes_query_cookie; xcb_xfixes_query_version_reply_t *xfixes_query; + debug_selectThreadId=pthread_self(); /* Create the window */ remoteVars->selstruct.xcbConnection = xcb_connect (RemoteHostVars.displayName, NULL); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git