コード例 #1
0
AXIS2_EXTERN void AXIS2_CALL
axutil_dll_desc_free(
    axutil_dll_desc_t *dll_desc,
    const axutil_env_t *env)
{
    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);

    if (dll_desc->dl_handler)
    {
        axutil_class_loader_delete_dll(env, dll_desc);
    }

    if (dll_desc->dll_name)
    {
        AXIS2_FREE(env->allocator, dll_desc->dll_name);
        dll_desc->dll_name = NULL;
    }

    if (dll_desc->path_qualified_dll_name)
    {
        AXIS2_FREE(env->allocator, dll_desc->path_qualified_dll_name);
        dll_desc->path_qualified_dll_name = NULL;
    }

    if (dll_desc)
    {
        AXIS2_FREE(env->allocator, dll_desc);
    }
    return;
}
コード例 #2
0
ファイル: msg_recv.c プロジェクト: Denisss025/wsfcpp
AXIS2_EXPORT axis2_status_t AXIS2_CALL
axis2_msg_recv_delete_svc_obj(
    axis2_msg_recv_t * msg_recv,
    const axutil_env_t * env,
    axis2_msg_ctx_t * msg_ctx)
{
    axis2_svc_t *svc = NULL;
    axis2_op_ctx_t *op_ctx = NULL;
    axis2_svc_ctx_t *svc_ctx = NULL;
    axutil_param_t *impl_info_param = NULL;
    axutil_param_t *scope_param = NULL;
    axis2_char_t *param_value = NULL;
    axutil_dll_desc_t *dll_desc = NULL;

    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);

    op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
    svc_ctx = axis2_op_ctx_get_parent(op_ctx, env);
    svc = axis2_svc_ctx_get_svc(svc_ctx, env);
    if(!svc)
    {
        return AXIS2_FAILURE;
    }

    scope_param = axis2_svc_get_param(svc, env, AXIS2_SCOPE);
    if(scope_param)
    {
        param_value = axutil_param_get_value(scope_param, env);
    }
    if(param_value && (0 == axutil_strcmp(AXIS2_APPLICATION_SCOPE, param_value)))
    {
        return AXIS2_SUCCESS;
    }

    impl_info_param = axis2_svc_get_param(svc, env, AXIS2_SERVICE_CLASS);
    if(!impl_info_param)
    {
        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_STATE_SVC, AXIS2_FAILURE);
        return AXIS2_FAILURE;
    }
    dll_desc = axutil_param_get_value(impl_info_param, env);
    return axutil_class_loader_delete_dll(env, dll_desc);
    (void)msg_recv;
}