[X2Go-Commits] [nx-libs] 29/219: nxagent: make nxagentX2go a Boolean

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:15 CEST 2019


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 fac36b24f55b02040bd6950d8de0385fdbb33703
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed May 8 23:23:54 2019 +0200

    nxagent: make nxagentX2go a Boolean
---
 nx-X11/programs/Xserver/hw/nxagent/Init.c     | 14 +++++++-------
 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index d02af3f8d..80ca5fac1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -183,13 +183,13 @@ int nxagentSaveUnder;
 int nxagentDoFullGeneration = 1;
 
  /*
- * 1 if agent running as X2goAgent
- * 0 if NX Agent
+ * True if agent is running as X2goAgent
+ * False if agent is running as NXAgent
  */
-int nxagentX2go;
+Bool nxagentX2go;
 
 /*
- * Checking if agent is x2go agent
+ * Check if agent is x2go agent
  */
 
 void checkX2goAgent(void)
@@ -200,13 +200,13 @@ void checkX2goAgent(void)
   fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName);
   #endif
 
-  if( strcasecmp(nxagentProgName,"x2goagent") == 0)
+  if (strcasecmp(nxagentProgName,"x2goagent") == 0)
   {
     fprintf(stderr, "\nrunning as X2Go Agent\n");
-    nxagentX2go=1;
+    nxagentX2go = True;
   }
   else
-    nxagentX2go=0;
+    nxagentX2go = False;
 }
 
 
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 045fa19fa..96b33ea7d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -756,7 +756,7 @@ XkbError:
         fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
         #endif
 
-        if (nxagentX2go == 1 && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
+        if (nxagentX2go && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
         {
           #ifdef TEST
           fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__);
@@ -874,7 +874,7 @@ XkbError:
              * method for switching that off is the creation of a dir
              * instead of a file.
              */
-            if (nxagentX2go == 1)
+            if (nxagentX2go)
             {
               nxagentWriteKeyboardDir();
             }
@@ -894,7 +894,7 @@ XkbError:
              * know about that yet. Once x2go starts using clone
              * we can drop this here.
              */
-            if (nxagentX2go == 1)
+            if (nxagentX2go)
             {
               nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions);
             }

--
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