Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/log.c')
-rw-r--r--lib/libalpm/log.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index d232bcc3..aac55e70 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -81,15 +81,19 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix,
void _alpm_log(alpm_handle_t *handle, alpm_loglevel_t flag, const char *fmt, ...)
{
- va_list args;
+ alpm_event_log_t event = {
+ .type = ALPM_EVENT_LOG,
+ .level = flag,
+ .fmt = fmt
+ };
- if(handle == NULL || handle->logcb == NULL) {
+ if(handle == NULL || handle->eventcb == NULL) {
return;
}
- va_start(args, fmt);
- handle->logcb(flag, fmt, args);
- va_end(args);
+ va_start(event.args, fmt);
+ EVENT(handle, &event);
+ va_end(event.args);
}
/* vim: set noet: */