out:
if (ret == 0 && old_state == DELETE) {
- int delete_event_sent = 0;
int cnt;
DbgPrint("Take place unexpected case\n");
handler = dlist_data(l);
if (handler->cbs.created.cb) {
- if (delete_event_sent == 0) {
+ if (!handler->common->request.deleted) {
if (lb_send_delete(handler, common->delete_type, handler->cbs.created.cb, handler->cbs.created.data) < 0) {
/*!
* \note
* Callback will be called in any cases
*/
}
-
- delete_event_sent = 1;
- } else {
+ } else if (handler->state != DELETE) {
handler->cbs.created.cb(handler, LB_STATUS_ERROR_CANCEL, handler->cbs.created.data);
lb_unref(handler, 1);
}
cb = default_delete_cb;
}
- packet = packet_create("delete", "ssi", handler->common->pkgname, handler->common->id, type);
+ packet = packet_create("delete", "ssid", handler->common->pkgname, handler->common->id, type, handler->common->timestamp);
if (!packet) {
ErrPrint("Failed to build a param\n");
if (cb) {