From: Brian West Date: Sat, 23 Jan 2010 18:37:11 +0000 (+0000) Subject: FSCORE-534 X-Git-Tag: v1.0.6~614 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a0bc97b5cb1bc420b8bce889664fc5b223a2e96;p=thirdparty%2Ffreeswitch.git FSCORE-534 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16482 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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")) {