]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
dom event example: init before register event impl
authorJesse J. Cook <jesse.j.cook@member.fsf.org>
Thu, 9 May 2013 21:17:43 +0000 (16:17 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 May 2013 09:21:08 +0000 (11:21 +0200)
commit90ebc54e9df639e869cc82bfad088896b88fcc09
treec154e968e216ccd5367ebae390d1e7c1b290cb60
parent353871b22a16efd792c604eb8755d4c3e20e1062
dom event example: init before register event impl

In the domain-events example C code virEventRegisterDefaultImpl was being
called before virConnectOpen without first calling virInitialize. While this
code worked, it is incorrect. Adding a call to g_string_new prior to the call
to virEventRegisterDefaultImpl would cause the code to break. This fix will
help avoid unintentional misue of the API.

Relates to: Ret Hat Bugzilla - Bug 961155
examples/domain-events/events-c/event-test.c