< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] Patch to DUM patch for no popt


Thanks Chris - I'll commit this fix!

Scott

On Mon, Aug 10, 2009 at 9:14 AM, Brody, Chris <chris.brody@xxxxxxxxxxx> wrote:
I decided to give resiprocate 1.5 a try and discovered that under resip/dum/test the CommandLineParser.cxx test program could not be compiled without the popt enabled. Here is a patch against the one in main (which is not different from 1.5) to fix the problem:

Index: CommandLineParser.cxx
===================================================================
--- CommandLineParser.cxx       (revision 8545)
+++ CommandLineParser.cxx       (working copy)
@@ -1,4 +1,6 @@
+#if defined (HAVE_POPT_H)
 #include <popt.h>
+#endif

 #include "CommandLineParser.hxx"
 #include "rutil/Logger.hxx"
@@ -39,6 +41,7 @@
   char* certPath = 0;
   Data basePath(getenv("HOME"));

+#if defined(HAVE_POPT_H)
   struct poptOption table[] = {
      {"log-type",     'l', POPT_ARG_STRING, &logType,   0, "where to send logging messages", "syslog|cerr|cout"},
      {"log-level",    'v', POPT_ARG_STRING, &logLevel,  0, "specify the default log level", "DEBUG|INFO|WARNING|ALERT"},
@@ -70,9 +73,10 @@
      POPT_AUTOHELP
      { NULL, 0, 0, NULL, 0 }
   };
-
+
   poptContext context = poptGetContext(NULL, argc, const_cast<const char**>(argv), table, 0);
   poptGetNextOpt(context);
+#endif

   mLogType = logType;
   mLogLevel = logLevel;
@@ -108,7 +112,9 @@
   // pubList for publish targets

   // Free the option parsing context.
+#if defined(HAVE_POPT_H)
   poptFreeContext(context);
+#endif
 }

 resip::Uri


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/