From 4e1ba2928a725ab13f229d08fd786a6cef390655 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 1 Jun 2011 10:53:12 +0000 Subject: [PATCH] reducing debug msgs --- src/transport/gnunet-service-transport.c | 30 +++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index f120c6e19..d0b90506f 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -6127,27 +6127,39 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static int ats_evaluate_results (int result, int solution, char * problem) { int cont = GNUNET_NO; +#if DEBUG_ATS || VERBOSE_ATS int error_kind = GNUNET_ERROR_TYPE_DEBUG; -#if DEBUG_ATS +#endif +#if VERBOSE_ATS error_kind = GNUNET_ERROR_TYPE_ERROR; #endif switch (result) { case GNUNET_SYSERR : /* GNUNET problem, not GLPK related */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s , GLPK solving not executed\n", problem); +#endif break; case GLP_ESTOP : /* search terminated by application */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s , Search terminated by application\n", problem); +#endif break; case GLP_EITLIM : /* iteration limit exceeded */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s Iteration limit exceeded\n", problem); +#endif break; case GLP_ETMLIM : /* time limit exceeded */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s Time limit exceeded\n", problem); +#endif break; case GLP_ENOPFS : /* no primal feasible solution */ case GLP_ENODFS : /* no dual feasible solution */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s No feasible solution\n", problem); +#endif break; case GLP_EBADB : /* invalid basis */ @@ -6158,34 +6170,50 @@ static int ats_evaluate_results (int result, int solution, char * problem) case GLP_EOBJLL : /* objective lower limit reached */ case GLP_EOBJUL : /* objective upper limit reached */ case GLP_EROOT : /* root LP optimum not provided */ +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s Invalid Input data: %i\n", problem, result); +#endif break; case 0: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s Problem has been solved\n", problem); +#endif break; } switch (solution) { case GLP_UNDEF: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s solution is undefined\n", problem); +#endif break; case GLP_OPT: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s solution is optimal\n", problem); +#endif cont=GNUNET_YES; break; case GLP_FEAS: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s solution is %s feasible, however, its optimality (or non-optimality) has not been proven, \n", problem, (0==strcmp(problem,"LP")?"":"integer")); +#endif cont=GNUNET_YES; break; case GLP_NOFEAS: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s problem has no %sfeasible solution\n", problem, (0==strcmp(problem,"LP")?"":"integer ")); +#endif break; case GLP_INFEAS: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s problem is infeasible \n", problem); +#endif break; case GLP_UNBND: +#if DEBUG_ATS || VERBOSE_ATS GNUNET_log (error_kind, "%s problem is unbounded \n", problem); +#endif default: break; } -- 2.25.1