Commit fac36b24 authored by Ulrich Sibiller's avatar Ulrich Sibiller

nxagent: make nxagentX2go a Boolean

parent 1b9d735b
...@@ -183,13 +183,13 @@ int nxagentSaveUnder; ...@@ -183,13 +183,13 @@ int nxagentSaveUnder;
int nxagentDoFullGeneration = 1; int nxagentDoFullGeneration = 1;
/* /*
* 1 if agent running as X2goAgent * True if agent is running as X2goAgent
* 0 if NX Agent * 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) void checkX2goAgent(void)
...@@ -200,13 +200,13 @@ void checkX2goAgent(void) ...@@ -200,13 +200,13 @@ void checkX2goAgent(void)
fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName); fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName);
#endif #endif
if( strcasecmp(nxagentProgName,"x2goagent") == 0) if (strcasecmp(nxagentProgName,"x2goagent") == 0)
{ {
fprintf(stderr, "\nrunning as X2Go Agent\n"); fprintf(stderr, "\nrunning as X2Go Agent\n");
nxagentX2go=1; nxagentX2go = True;
} }
else else
nxagentX2go=0; nxagentX2go = False;
} }
......
...@@ -756,7 +756,7 @@ XkbError: ...@@ -756,7 +756,7 @@ XkbError:
fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
#endif #endif
if (nxagentX2go == 1 && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0)) if (nxagentX2go && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__); fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__);
...@@ -874,7 +874,7 @@ XkbError: ...@@ -874,7 +874,7 @@ XkbError:
* method for switching that off is the creation of a dir * method for switching that off is the creation of a dir
* instead of a file. * instead of a file.
*/ */
if (nxagentX2go == 1) if (nxagentX2go)
{ {
nxagentWriteKeyboardDir(); nxagentWriteKeyboardDir();
} }
...@@ -894,7 +894,7 @@ XkbError: ...@@ -894,7 +894,7 @@ XkbError:
* know about that yet. Once x2go starts using clone * know about that yet. Once x2go starts using clone
* we can drop this here. * we can drop this here.
*/ */
if (nxagentX2go == 1) if (nxagentX2go)
{ {
nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment