]> xenbits.xensource.com Git - libvirt.git/commit
event-test: Properly terminate strings printed from callbacks
authorKristina Hanicova <khanicov@redhat.com>
Fri, 19 Feb 2021 13:07:53 +0000 (14:07 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 19 Feb 2021 14:10:48 +0000 (15:10 +0100)
commit4fc755bec1c90133e996bbd9bc1894a7fac305d5
treed178c5ff4758fc122e298c203e776fc1fb0eaf9f
parentc0ac0144a32b42230b06c32580d0f7cc0095cbe1
event-test: Properly terminate strings printed from callbacks

Stdio was buffering strings in functions:
myDomainEventBlockJobCallback,
myDomainEventBlockThresholdCallback,
myDomainEventMemoryFailureCallback. It caused flushing the
printed strings from callbacks at the end of a run, not
gradually. The solution is to add \n at the end of each string.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
examples/c/misc/event-test.c