[gdm: 53/70] Support VERSION command so that if user's run gdmflexiser



commit 4a1d5fe7d126d495f910e06da3e4287923c2359b
Author: Brian Cameron <brian cameron sun com>
Date:   Tue Feb 17 18:50:44 2009 +0000

    Support VERSION command so that if user's run gdmflexiser
    
    2009-02-17 Brian Cameron <brian cameron sun com>
    
            * utils/gdmflexiserver.c: Support VERSION command so that if user's
            run gdmflexiser --command=VERSION, it will return the version number.
            This is nice for backwards compatibility.  Fixes bug #535450.
    
    svn path=/trunk/; revision=6713
---
 ChangeLog              |    8 +++++++-
 utils/gdmflexiserver.c |    9 +++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 16b4e64..c8dfa06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
 2009-02-17 Brian Cameron <brian cameron sun com>
 
+	* utils/gdmflexiserver.c: Support VERSION command so that if user's
+	run gdmflexiser --command=VERSION, it will return the version number.
+	This is nice for backwards compatibility.  Fixes bug #535450.
+
+2009-02-17 Brian Cameron <brian cameron sun com>
+
 	* docs/C/gdm.xml: Documentation improvements.  Fixes bugs #569893 and
-	  #571250.
+	#571250.
 
 2009-02-17 Brian Cameron <brian cameron sun com>
 
diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c
index f215934..293c268 100644
--- a/utils/gdmflexiserver.c
+++ b/utils/gdmflexiserver.c
@@ -720,9 +720,14 @@ main (int argc, char *argv[])
                 exit (1);
         }
 
-        /* don't support commands */
+        /* don't support commands other than VERSION */
         if (send_command != NULL) {
-                g_warning ("No longer supported");
+                if (strcmp (send_command, "VERSION") == 0) {
+                        g_print ("GDM  %s \n", VERSION);
+                        return 0;
+                } else {
+                        g_warning ("No longer supported");
+                }
                 return 1;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]