summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
caef340)
release pixmap can be called in the deleted callback.
in that case, the handler has DELETE state.
so the release pixmap function should not check the handler's state.
Just we have to believe the user. who should use the valid handler.
Change-Id: Icacb8aa80660534cd7c8ebdc88b56066fd50fa4a
Name: liblivebox-viewer
Summary: Library for developing the application
Name: liblivebox-viewer
Summary: Library for developing the application
Release: 1
Group: HomeTF/Livebox
License: Flora
Release: 1
Group: HomeTF/Livebox
License: Flora
return lb_acquire_lb_pixmap(handler, cb, data);
}
return lb_acquire_lb_pixmap(handler, cb, data);
}
+/*!
+ * \note
+ * Do not check the state of handler and common-handler.
+ * If this function is used in the deleted callback,
+ * the handler and common-handler's state would be DELETE
+ * if this function check the state of handles,
+ * user cannot release the pixmap.
+ */
EAPI int livebox_release_lb_pixmap(struct livebox *handler, int pixmap)
{
struct packet *packet;
EAPI int livebox_release_lb_pixmap(struct livebox *handler, int pixmap)
{
struct packet *packet;
- if (!handler || pixmap == 0 || handler->state != CREATE) {
+ if (!handler || pixmap == 0 /* || handler->state != CREATE */ ) {
ErrPrint("Handler is invalid [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
ErrPrint("Handler is invalid [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
- if (!handler->common || handler->common->state != CREATE) {
+ if (!handler->common /* || handler->common->state != CREATE */) {
ErrPrint("Handler is invalid\n");
return LB_STATUS_ERROR_INVALID;
}
ErrPrint("Handler is invalid\n");
return LB_STATUS_ERROR_INVALID;
}
+/*!
+ * \note
+ * Do not check the state of handler and common-handler.
+ * If this function is used in the deleted callback,
+ * the handler and common-handler's state would be DELETE
+ * if this function check the state of handles,
+ * user cannot release the pixmap.
+ */
EAPI int livebox_release_pd_pixmap(struct livebox *handler, int pixmap)
{
struct packet *packet;
EAPI int livebox_release_pd_pixmap(struct livebox *handler, int pixmap)
{
struct packet *packet;
- if (!handler || pixmap == 0 || handler->state != CREATE) {
+ if (!handler || pixmap == 0 /* || handler->state != CREATE */) {
ErrPrint("Handler is invalid [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
ErrPrint("Handler is invalid [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
- if (!handler->common || handler->common->state != CREATE) {
+ if (!handler->common /* || handler-common->state != CREATE */) {
ErrPrint("Handler is invalid\n");
return LB_STATUS_ERROR_INVALID;
}
ErrPrint("Handler is invalid\n");
return LB_STATUS_ERROR_INVALID;
}