return LB_STATUS_ERROR_FAULT;
}
- if (instance_state(inst) == INST_DESTROYED) {
- ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
- return LB_STATUS_ERROR_INVALID;
- }
-
if (out_inst)
*out_inst = inst;
if (ret != LB_STATUS_SUCCESS)
goto out;
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
ret = instance_lb_update_begin(inst, priority, content, title);
if (ret == LB_STATUS_SUCCESS)
if (ret != LB_STATUS_SUCCESS)
goto out;
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
ret = instance_lb_update_end(inst);
if (ret == LB_STATUS_SUCCESS)
if (ret != LB_STATUS_SUCCESS)
goto out;
- if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
+ if (package_pd_type(pkg) == PD_TYPE_BUFFER)
(void)instance_pd_update_begin(inst);
- } else {
+ else
ErrPrint("Invalid request[%s]\n", id);
- }
out:
return NULL;
}
ret = validate_request(pkgname, id, &inst, NULL);
- if (ret == LB_STATUS_SUCCESS)
- (void)instance_forward_packet(inst, packet_ref((struct packet *)packet));
+ if (ret == LB_STATUS_SUCCESS) {
+ if (instance_state(inst) == INST_DESTROYED)
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ else
+ (void)instance_forward_packet(inst, packet_ref((struct packet *)packet));
+ }
out:
return NULL;
if (ret != LB_STATUS_SUCCESS)
goto out;
- if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
+ if (package_pd_type(pkg) == PD_TYPE_BUFFER)
(void)instance_pd_update_end(inst);
- } else {
+ else
ErrPrint("Invalid request[%s]\n", id);
- }
out:
return NULL;
if (ret == LB_STATUS_SUCCESS) {
char *filename;
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
instance_set_lb_info(inst, priority, content_info, title);
switch (package_lb_type(instance_package(inst))) {
}
ret = validate_request(pkgname, id, &inst, NULL);
- if (ret == LB_STATUS_SUCCESS)
- (void)instance_hold_scroll(inst, seize);
+ if (ret == LB_STATUS_SUCCESS) {
+ if (instance_state(inst) == INST_DESTROYED)
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ else
+ (void)instance_hold_scroll(inst, seize);
+ }
out:
return NULL;
if (ret != LB_STATUS_SUCCESS)
goto out;
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
switch (package_pd_type(instance_package(inst))) {
case PD_TYPE_SCRIPT:
if (script_handler_is_loaded(instance_pd_script(inst))) {
}
ret = validate_request(pkgname, id, &inst, &pkg);
- if (ret != LB_STATUS_SUCCESS) {
- id = "";
+ id = "";
+
+ if (ret != LB_STATUS_SUCCESS)
goto out;
- }
- id = "";
ret = LB_STATUS_ERROR_INVALID;
+
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
if (target == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
struct buffer_info *info;
}
ret = validate_request(pkgname, id, &inst, &pkg);
- if (ret != LB_STATUS_SUCCESS) {
- id = "";
+ id = "";
+ if (ret != LB_STATUS_SUCCESS)
goto out;
- }
ret = LB_STATUS_ERROR_INVALID;
/*!
* \note
* Reset "id", It will be re-used from here
*/
- id = "";
+
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
if (type == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
struct buffer_info *info;
goto out;
ret = LB_STATUS_ERROR_INVALID;
+
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ goto out;
+ }
+
if (type == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
struct buffer_info *info;
}
} else {
ret = validate_request(pkgname, id, &inst, NULL);
- if (ret == LB_STATUS_SUCCESS)
+ if (ret == LB_STATUS_SUCCESS) {
+ if (instance_state(inst) == INST_DESTROYED) {
+ ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+ ret = LB_STATUS_ERROR_INVALID;
+ goto out;
+ }
+
ret = instance_set_period(inst, period);
+ }
}
DbgPrint("Change the update period: %s, %lf : %d\n", pkgname, period, ret);