msg_debug ("mime_foreach_callback: found part with content-type: %s/%s", type->type, type->subtype);
task->parts = g_list_prepend (task->parts, mime_part);
/* Skip empty parts */
- process_text_part (task, part_content, type, (part_content->len > 0));
+ process_text_part (task, part_content, type, (part_content->len <= 0));
}
else {
msg_warn ("mime_foreach_callback: write to stream failed: %d, %s", errno, strerror (errno));
}
static gboolean
-process_regexp_expression (struct expression *expr, struct worker_task *task)
+process_regexp_expression (struct expression *expr, char *symbol, struct worker_task *task)
{
GQueue *stack;
gsize cur, op1, op2;
}
}
else {
- msg_warn ("process_regexp_expression: regexp expression seems to be invalid: empty stack at the end of expression");
+ msg_warn ("process_regexp_expression: regexp expression seems to be invalid: empty stack at the end of expression, symbol %s", symbol);
}
g_queue_free (stack);
{
struct regexp_module_item *item = user_data;
- if (process_regexp_expression (item->expr, task)) {
+ if (process_regexp_expression (item->expr, item->symbol, task)) {
insert_result (task, regexp_module_ctx->metric, item->symbol, 1, NULL);
}
}
}
}
else {
- if (process_regexp_expression (cur->data, task)) {
+ if (process_regexp_expression (cur->data, "regexp_match_number", task)) {
res ++;
}
if (res >= param_count) {