1
--- Main.c.old 2007-07-18 17:39:13.000000000 +0200
2
+++ Main.c 2008-03-12 04:40:30.000000000 +0100
9
+ char *nx_commfd_str = NULL;
11
options = getenv("NX_DISPLAY");
13
- if (NXTransParseCommandLine(argc, argv) < 0)
15
+ if ((nx_commfd_str = getenv("NX_COMMFD")) != NULL)
19
+ int nx_commfd = atoi(nx_commfd_str);
21
- if (NXTransParseEnvironment(options, 0) < 0)
25
+ result = NXTransCreate(nx_commfd, NX_MODE_SERVER, options);
27
+ // go into endless loop
31
+ while (NXTransRunning(NX_FD_ANY))
32
+ result = NXTransContinue(NULL);
37
+ if (NXTransParseCommandLine(argc, argv) < 0)
42
+ if (NXTransParseEnvironment(options, 0) < 0)
48
+ * This should not return...
52
+ fprintf(stderr, "Main: Yielding control to NX entry point.\n");
56
- * This should not return...
60
- fprintf(stderr, "Main: Yielding control to NX entry point.\n");
63
- result = NXTransProxy(NX_FD_ANY, NX_MODE_ANY, NX_DISPLAY_ANY);
64
+ result = NXTransProxy(NX_FD_ANY, NX_MODE_ANY, NX_DISPLAY_ANY);
68
* ...So these should not be called.