From 7a0bc97b5cb1bc420b8bce889664fc5b223a2e96 Mon Sep 17 00:00:00 2001 From: Brian West Date: Sat, 23 Jan 2010 18:37:11 +0000 Subject: [PATCH] FSCORE-534 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16482 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/switch.c b/src/switch.c index a07101e41b..55bafb7673 100644 --- a/src/switch.c +++ b/src/switch.c @@ -44,6 +44,7 @@ #endif #include +#include #include "private/switch_core_pvt.h" /* pid filename: Stores the process id of the freeswitch process */ @@ -321,6 +322,7 @@ int main(int argc, char *argv[]) "\t-g [group] -- specify group to switch to\n" #endif "\t-help -- this message\n" + "\t-version -- print the version and exit\n" #ifdef HAVE_SETRLIMIT "\t-waste -- allow memory waste\n" "\t-core -- dump cores\n" @@ -464,6 +466,13 @@ int main(int argc, char *argv[]) nf++; known_opt++; } + + if (local_argv[x] && !strcmp(local_argv[x], "-version")) { + fprintf(stdout, "FreeSWITCH version: %s\n", SWITCH_VERSION_FULL); + return 0; + known_opt++; + } + #endif #ifdef HAVE_SETRLIMIT if (local_argv[x] && !strcmp(local_argv[x], "-core")) {