[X2Go-Commits] [nx-libs] 15/30: Atoms.c: more debugging output

git-admin at x2go.org git-admin at x2go.org
Tue Jul 3 22:24:04 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit f2d3eac8978080662334c6f2a33942e9c6af4d01
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Tue Jun 19 19:54:01 2018 +0200

    Atoms.c: more debugging output
---
 nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index 5e578a5..1e9a4bd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -678,18 +678,31 @@ Atom nxagentLocalToRemoteAtom(Atom local)
   const char    *string;
   Atom    remote;
 
+  #ifdef TEST
+  fprintf(stderr, "%s: entering\n", __func__);
+  #endif
+
   if (!ValidAtom(local))
   {
+    #ifdef DEBUG
+    fprintf(stderr, "%s: local [%d] is no valid - returning None\n", __func__, remote);
+    #endif
     return None;
   }
 
   if (local <= XA_LAST_PREDEFINED)
   {
+    #ifdef DEBUG
+    fprintf(stderr, "%s: local [%d] is < XA_LAST_PREDEFINED [%d]\n", __func__, local, XA_LAST_PREDEFINED);
+    #endif
     return local;
   }
 
   if ((current = nxagentFindAtomByLocalValue(local)))
   {
+    #ifdef TEST
+    fprintf(stderr, "%s: local [%d] -> remote [%d]\n", __func__, local, current->remote);
+    #endif
     return current->remote;
   }
 
@@ -708,6 +721,10 @@ Atom nxagentLocalToRemoteAtom(Atom local)
 
   nxagentWriteAtom(local, remote, string, True);
 
+  #ifdef TEST
+  fprintf(stderr, "%s: local [%d] -> remote [%d (%s)]\n", __func__, local, remote, string);
+  #endif
+
   return remote;
 }
 
@@ -719,11 +736,17 @@ Atom nxagentRemoteToLocalAtom(Atom remote)
 
   if (remote == None || remote == BAD_RESOURCE)
   {
+    #ifdef DEBUG
+    fprintf(stderr, "%s: remote [%d] is None or BAD_RESOURCE\n", __func__, remote);
+    #endif
     return None;
   }
 
   if (remote <= XA_LAST_PREDEFINED)
   {
+    #ifdef DEBUG
+    fprintf(stderr, "%s: remote [%d] is <= XA_LAST_PREDEFINED [%d]\n", __func__, remote, XA_LAST_PREDEFINED);
+    #endif
     return remote;
   }
 
@@ -747,6 +770,9 @@ Atom nxagentRemoteToLocalAtom(Atom remote)
       }
     }
 
+    #ifdef DEBUG
+    fprintf(stderr, "%s: remote [%d] -> local [%d]\n", __func__, remote, current->local);
+    #endif
     return current->local;
   }
 
@@ -765,6 +791,9 @@ Atom nxagentRemoteToLocalAtom(Atom remote)
 
     nxagentWriteAtom(local, remote, string, True);
 
+    #ifdef TEST
+    fprintf(stderr, "%s: remote [%d (%s)] -> local [%d]\n", __func__, remote, string, local);
+    #endif
     XFree(string);
 
     return local;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list