On 07/20/2012 04:02 PM, Jakub Filak wrote:
> Signed-off-by: Jakub Filak <[email protected]>
> ---
>  src/gui-wizard-gtk/wizard.c |    8 +++++++-
>  src/plugins/ureport.c       |    4 ++--
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
> index c93ff42..8591cad 100644
> --- a/src/gui-wizard-gtk/wizard.c
> +++ b/src/gui-wizard-gtk/wizard.c
> @@ -1300,6 +1300,13 @@ static void run_event_gtk_error(const char 
> *error_line, void *param)
>  static char *run_event_gtk_logging(char *log_line, void *param)
>  {
>      update_command_run_log(log_line, (struct analyze_event_data *)param);
> +
> +    if (!strcmp(log_line, "THANKYOU"))

I still find this methid of writing string comparisons unreadable.

      strcmp(log_line, "THANKYOU") == 0

> +    {
> +        VERB1 log("Received a request for termination of processing of event 
> chain. (Request: '%s')", log_line);
> +        g_auto_event_list = NULL;
> +    }
> +
>      return log_line;
>  }
>  
> @@ -1592,7 +1599,6 @@ static void start_event_run(const char *event_name,
>      );
>  
>      gtk_label_set_text(status_label, start_msg);
> -
>      VERB1 log("running event '%s' on '%s'", event_name, g_dump_dir_name);
>      char *msg = xasprintf("--- Running %s ---\n", event_name);
>      append_to_textview(evd->tv_log, msg);
> diff --git a/src/plugins/ureport.c b/src/plugins/ureport.c
> index 13d1c9e..a504285 100644
> --- a/src/plugins/ureport.c
> +++ b/src/plugins/ureport.c
> @@ -166,8 +166,8 @@ int main(int argc, char **argv)
>              VERB1 log("is known: %s", response.value);
>              ret = 0;
>              /* If a reported problem is not known then emit NEEDMORE */
> -            if (strcmp("true",response.value))
> -                log("NEEDMORE");
> +            if (!strcmp("true", response.value))
> +                log("THANKYOU");
>              break;
>          case UREPORT_SERVER_RESP_ERROR:
>              VERB1 log("server side error: %s", response.value);

Reply via email to