search for: vnf_control_del_network_timeout_cb

Displaying 2 results from an estimated 2 matches for "vnf_control_del_network_timeout_cb".

2020 Apr 07
0
when virEventAddTimeout trigger timeout ,should in the callback call virConnectDomainEventDeregisterAny ?
...EMOVED, VIR_DOMAIN_EVENT_CALLBACK(vnf_control_del_network_cb), cb_para, vnf_control_del_network_cb_free); flags |= VIR_DOMAIN_AFFECT_CONFIG; if (virDomainIsActive(dom) == 1) { flags |= VIR_DOMAIN_AFFECT_LIVE; } cb_para->timer_id = virEventAddTimeout(cb_para->time_out, vnf_control_del_network_timeout_cb, cb_para, vnf_control_del_network_cb_free); ret = virDomainDetachDeviceFlags(dom, xml, flags); //above run in a thread function void vnf_control_del_network_cb(virConnectPtr conn, virDomainPtr dom, const char *dev,void * opaque) { struct vnf_del_netwk_opaque * arg = (struct vn...
2020 Apr 13
2
what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result
...mainEventRegisterAny ? if can't trigger the vnf_control_del_network_cb callback , the memory :cb_para will mem-leak, so in order to deal the execpt ,i register a timer to process the VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED timeout cb_para->timer_id = virEventAddTimeout(cb_para->time_out, vnf_control_del_network_timeout_cb, cb_para, vnf_control_del_network_cb_free); thought use the timer ,can i avoid the cb_para mem-leak, but fail to achive hotplug network .