Change-Id: Ib1f5a133a57bad976e5e97dddeca7715ff302d7c
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
/**
* @brief Called when service is discovered.
/**
* @brief Called when service is discovered.
+ * @remarks @a service will be freed after this callback. Use @a vine_service_clone().
* @since_tizen 6.5
* @param[in] session The session handle
* @param[in] discovered_service The discovered service
* @since_tizen 6.5
* @param[in] session The session handle
* @param[in] discovered_service The discovered service
{
vine_event_queue_s *event_fd_handle = (vine_event_queue_s *)event_fd;
{
vine_event_queue_s *event_fd_handle = (vine_event_queue_s *)event_fd;
- //g_async_queue_unref(event_fd_handle->event_queue);
+ vine_event *event;
+ while ( (event = event_fd_handle->event_queue.pop()) != NULL) {
+ if (event->free_func)
+ event->free_func(event->event_data);
+ }
if (event_fd_handle->fd >= 0)
close(event_fd_handle->fd);
free(event_fd);
if (event_fd_handle->fd >= 0)
close(event_fd_handle->fd);
free(event_fd);
if (s->discovered_cb)
s->discovered_cb(s, discovered_service, state, s->discovered_cb_data);
if (s->discovered_cb)
s->discovered_cb(s, discovered_service, state, s->discovered_cb_data);
+
+ _vine_service_destroy(discovered_service);
}
int _vine_session_start_discovery(vine_session_h session,
}
int _vine_session_start_discovery(vine_session_h session,