Fix the get_new method
When calling the get_new() method to generate an Event object, the
::sd_event_new method should be used instead the ::sd_event_default
method.
Tested:
Before call get_default and get_new():
event_default = 0x646da0
event_new = 0x646da0
After call get_default and get_new():
event_default = 0x646da0
event_new = 0x646ff8
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I232f1167949ca9bbdedcd368092adf50bf268941
diff --git a/src/sdeventplus/internal/sdevent.cpp b/src/sdeventplus/internal/sdevent.cpp
index 608dbcf..33e22aa 100644
--- a/src/sdeventplus/internal/sdevent.cpp
+++ b/src/sdeventplus/internal/sdevent.cpp
@@ -13,7 +13,7 @@
int SdEventImpl::sd_event_new(sd_event** event) const
{
- return ::sd_event_default(event);
+ return ::sd_event_new(event);
}
sd_event* SdEventImpl::sd_event_ref(sd_event* event) const