本文整理汇总了C++中AXIS2_MALLOC函数的典型用法代码示例。如果您正苦于以下问题:C++ AXIS2_MALLOC函数的具体用法?C++ AXIS2_MALLOC怎么用?C++ AXIS2_MALLOC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AXIS2_MALLOC函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sandesha2_address_create
AXIS2_EXTERN sandesha2_address_t* AXIS2_CALL
sandesha2_address_create(
const axutil_env_t *env,
axis2_char_t *ns_val,
axis2_endpoint_ref_t *epr)
{
sandesha2_address_t *address = NULL;
AXIS2_PARAM_CHECK(env->error, ns_val, NULL);
address = (sandesha2_address_t *)AXIS2_MALLOC
(env->allocator, sizeof(sandesha2_address_t));
if(!address)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
address->ns_val = axutil_strdup(env, ns_val);
address->epr = epr;
return address;
}
开发者ID:alexis-gruet,项目名称:kt_sandesha2,代码行数:22,代码来源:address.c
示例2: axis2_svc_grp_builder_create
AXIS2_EXTERN axis2_svc_grp_builder_t *AXIS2_CALL
axis2_svc_grp_builder_create(
const axutil_env_t * env)
{
axis2_svc_grp_builder_t *svc_grp_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
svc_grp_builder = (axis2_svc_grp_builder_t *)AXIS2_MALLOC(env->allocator,
sizeof(axis2_svc_grp_builder_t));
if(!svc_grp_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
svc_grp_builder->svc_grp = NULL;
svc_grp_builder->desc_builder = NULL;
return svc_grp_builder;
}
开发者ID:Denisss025,项目名称:wsfcpp,代码行数:22,代码来源:svc_grp_builder.c
示例3: axiom_mime_part_create
AXIS2_EXTERN axiom_mime_part_t *AXIS2_CALL
axiom_mime_part_create(
const axutil_env_t *env)
{
axiom_mime_part_t *mime_part = NULL;
mime_part = AXIS2_MALLOC(env->allocator, sizeof(axiom_mime_part_t));
if(mime_part)
{
mime_part->part = NULL;
mime_part->file_name = NULL;
mime_part->part_size = 0;
mime_part->type = AXIOM_MIME_PART_UNKNOWN;
mime_part->user_param = NULL;
return mime_part;
}
else
{
return NULL;
}
}
开发者ID:basicDM,项目名称:wso2-wsf-cpp-gg,代码行数:22,代码来源:mime_part.c
示例4: axutil_stream_create_internal
AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
axutil_stream_create_internal(
const axutil_env_t *env)
{
axutil_stream_t *stream = NULL;
stream = (axutil_stream_t *)AXIS2_MALLOC(env->allocator, sizeof(axutil_stream_t));
if(!stream)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory. Cannot create axutil stream");
return NULL;
}
stream->buffer = NULL;
stream->buffer_head = NULL;
stream->fp = NULL;
stream->socket = -1;
stream->len = -1;
stream->max_len = -1;
stream->axis2_eof = EOF;
return stream;
}
开发者ID:bnoordhuis,项目名称:axis2-c,代码行数:22,代码来源:stream.c
示例5: axutil_stream_read_socket
int AXIS2_CALL
axutil_stream_read_socket(
axutil_stream_t *stream,
const axutil_env_t *env,
void *buffer,
size_t count)
{
int len = 0;
if(-1 == stream->socket)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SOCKET, AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"Trying to do operation on closed/not-opened socket");
return -1;
}
if(!buffer)
{
return -1;
}
len = (int)recv(stream->socket, buffer, (int)count, 0);
/* We are sure that the difference lies within the int range */
#ifdef AXIS2_TCPMON
if (len > 1)
{
axis2_char_t *temp = NULL;
temp = (axis2_char_t *) AXIS2_MALLOC(env->allocator, (len + 1) * sizeof(axis2_char_t));
if (temp)
{
memcpy(temp, buffer, len * sizeof(axis2_char_t));
temp[len] = '\0';
fprintf(stderr, "%s", temp);
AXIS2_FREE(env->allocator, temp);
}
}
#endif
return len;
}
开发者ID:bnoordhuis,项目名称:axis2-c,代码行数:39,代码来源:stream.c
示例6: main
int main()
{
axis2_char_t* hash = NULL;
axutil_env_t *env = NULL;
axis2_char_t* nonce = NULL;
axis2_char_t* created = NULL;
env = test_init();
printf("--Testing started--------------------------------------------\n");
printf("\n--Testing hash-----------------------------------------------\n");
hash = rampart_crypto_sha1(env, "WScqanjCEAC4mQoBE07sAQ==", "2003-07-16T01:24:32Z", "IloveDogs");
if (!hash)
{
printf("No hash generated :( ...\n");
}
printf("Hash = %s", hash);
#if 0
/*encode Base64*/
axis2_char_t* encodedStr = NULL;
encodedStr = AXIS2_MALLOC(env->allocator, 20);
axutil_base64_encode_binary(encodedStr, hash, 20);
printf("Hash = %s \n", encodedStr);
#endif
printf("\n----Testing nonce------------------------------------------\n");
nonce = rampart_generate_nonce(env);
printf("NONCE: %s", nonce);
printf("\n----Testing created----------------------------------------\n");
created = rampart_generate_time(env, 300);
printf("CREATED: %s", created);
printf("\n----End of testings----------------------------------------\n");
return 0;
}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:38,代码来源:test_sha.c
示例7: rp_read_bin_mime_image
//-----------------------------------------------------------------------------
// Reads a binary image from the file fp.
// The file should be composed of HTTP mime messages as received in the form of
// an HTTP response. fp is already positioned at the start of the image.
// The boundary is given by boundId.
//
char * rp_read_bin_mime_image(
const axutil_env_t * env,
FILE *fp,
const char *boundId,
int *len)
{
char *image_binary = NULL;
int actual_filled = 0;
TmpStore *ts = NULL;
axutil_linked_list_t *ll = axutil_linked_list_create(env);
*len = 0;
Rp_cb_ctx fill_ctx;
init_rp_cb_ctx(env, &fill_ctx);
fill_ctx.fp = fp;
fill_ctx.bound = boundId;
while (!fill_ctx.done)
{
ts = (TmpStore *)AXIS2_MALLOC(env->allocator, sizeof(TmpStore));
actual_filled = rp_fill_buff_CB(ts->buf, SP_IMG_BUF_SIZE, &fill_ctx);
if (0 == actual_filled)
{
AXIS2_FREE(env->allocator, ts);
break;
}
ts->size = actual_filled;
*len += actual_filled;
axutil_linked_list_add (ll, env, (void *)ts);
}
image_binary = compose_buffer(env, *len, ll);
axutil_linked_list_free(ll, env);
return image_binary;
}
开发者ID:EOxServer,项目名称:soap-proxy,代码行数:44,代码来源:sp_image.c
示例8: axis2_endpoint_ref_create
axis2_endpoint_ref_t *AXIS2_CALL
axis2_endpoint_ref_create(
const axutil_env_t * env,
const axis2_char_t * address)
{
axis2_endpoint_ref_t *endpoint_ref = NULL;
AXIS2_ENV_CHECK(env, NULL);
endpoint_ref = AXIS2_MALLOC(env->allocator, sizeof(axis2_endpoint_ref_t));
if (!endpoint_ref)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
endpoint_ref->address = NULL;
endpoint_ref->interface_qname = NULL;
endpoint_ref->ref_param_list = NULL;
endpoint_ref->metadata_list = NULL;
endpoint_ref->ref_attribute_list = NULL;
endpoint_ref->meta_attribute_list = NULL;
endpoint_ref->extension_list = NULL;
endpoint_ref->svc_name = NULL;
if (address)
{
endpoint_ref->address = axutil_strdup(env, address);
if (!(endpoint_ref->address))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
axis2_endpoint_ref_free(endpoint_ref, env);
return NULL;
}
}
return endpoint_ref;
}
开发者ID:cs525-koala,项目名称:eucalyptus-deps,代码行数:38,代码来源:endpoint_ref.c
示例9: openssl_rsa_pub_decrypt
int AXIS2_CALL
openssl_rsa_pub_decrypt(
const axutil_env_t *env,
const openssl_pkey_t *pkey,
const axis2_char_t *padding,
oxs_buffer_t *in,
oxs_buffer_t *out)
{
unsigned char *decrypted = NULL;
int ret;
EVP_PKEY *key = NULL;
int pad = RSA_PKCS1_PADDING;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
key = (EVP_PKEY *)openssl_pkey_get_key(pkey, env);
if(0 == axutil_strcmp(padding, OPENSSL_RSA_PKCS1_OAEP_PADDING ) ){
pad = RSA_PKCS1_OAEP_PADDING;
}else if(0 == axutil_strcmp(padding, OPENSSL_RSA_PKCS1_PADDING ) ){
pad = RSA_PKCS1_PADDING;
}
decrypted = AXIS2_MALLOC(env->allocator, RSA_size(key->pkey.rsa));
ret = RSA_public_decrypt(oxs_buffer_get_size(in, env),
oxs_buffer_get_data(in, env),
decrypted,
key->pkey.rsa ,
pad);
if (ret < 0)
{
oxs_error(env, OXS_ERROR_LOCATION, OXS_ERROR_OPENSSL_FUNC_FAILED,
"PUBKEY decrypt (signature verification) failed");
return (-1);
}
oxs_buffer_populate(out, env, decrypted, ret);
return ret;
}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:38,代码来源:rsa.c
示例10: adb_importCertToStore_create
/************************* Function Implmentations ********************************/
adb_importCertToStore_t* AXIS2_CALL
adb_importCertToStore_create(
const axutil_env_t *env)
{
adb_importCertToStore_t *_importCertToStore = NULL;
axutil_qname_t* qname = NULL;
AXIS2_ENV_CHECK(env, NULL);
_importCertToStore = (adb_importCertToStore_t *) AXIS2_MALLOC(env->
allocator, sizeof(adb_importCertToStore_t));
if(NULL == _importCertToStore)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
memset(_importCertToStore, 0, sizeof(adb_importCertToStore_t));
_importCertToStore->property_Type = axutil_strdup(env, "adb_importCertToStore");
_importCertToStore->property_fileName = NULL;
_importCertToStore->is_valid_fileName = AXIS2_FALSE;
_importCertToStore->property_fileData = NULL;
_importCertToStore->is_valid_fileData = AXIS2_FALSE;
_importCertToStore->property_keyStoreName = NULL;
_importCertToStore->is_valid_keyStoreName = AXIS2_FALSE;
qname = axutil_qname_create (env,
"importCertToStore",
"http://service.keystore.security.carbon.wso2.org",
NULL);
_importCertToStore->qname = qname;
return _importCertToStore;
}
开发者ID:AMFIRNAS,项目名称:wsf,代码行数:39,代码来源:adb_importCertToStore.c
示例11: axutil_stream_write_basic
int AXIS2_CALL
axutil_stream_write_basic(
axutil_stream_t *stream,
const axutil_env_t *env,
const void *buffer,
size_t count)
{
int new_len = 0;
if(!buffer)
return -1;
new_len = (int)(stream->len + count);
/* We are sure that the difference lies within the int range */
if(new_len > stream->max_len)
{
axis2_char_t *tmp = (axis2_char_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t)
* (new_len + AXIS2_STREAM_DEFAULT_BUF_SIZE));
if(!tmp)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return -1;
}
/*
* pre allocation: extra AXIS2_STREAM_DEFAULT_BUF_SIZE more bytes
* allocated
*/
stream->max_len = new_len + AXIS2_STREAM_DEFAULT_BUF_SIZE;
memcpy(tmp, stream->buffer, sizeof(axis2_char_t) * stream->len);
AXIS2_FREE(env->allocator, stream->buffer_head);
stream->buffer = tmp;
stream->buffer_head = tmp;
}
memcpy(stream->buffer + (stream->len * sizeof(axis2_char_t)), buffer, count);
stream->len += (int)count;
/* We are sure that the difference lies within the int range */
return (int)count;
}
开发者ID:jzoppi,项目名称:axis2c-trunk,代码行数:38,代码来源:stream.c
示例12: axis2_ws_info_list_create_with_dep_engine
AXIS2_EXTERN axis2_ws_info_list_t *AXIS2_CALL
axis2_ws_info_list_create_with_dep_engine(
const axutil_env_t * env,
struct axis2_dep_engine *dep_engine)
{
axis2_ws_info_list_t *ws_info_list = NULL;
ws_info_list = (axis2_ws_info_list_t *)AXIS2_MALLOC(env->allocator,
sizeof(axis2_ws_info_list_t));
if(!ws_info_list)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
memset((void *)ws_info_list, 0, sizeof(axis2_ws_info_list_t));
ws_info_list->dep_engine = dep_engine;
ws_info_list->ws_info_list = axutil_array_list_create(env, 0);
if(!(ws_info_list->ws_info_list))
{
axis2_ws_info_list_free(ws_info_list, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
ws_info_list->current_info_list = axutil_array_list_create(env, 0);
if(!(ws_info_list->current_info_list))
{
axis2_ws_info_list_free(ws_info_list, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
return ws_info_list;
}
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:38,代码来源:ws_info_list.c
示例13: sandesha2_seq_report_create
AXIS2_EXTERN sandesha2_seq_report_t * AXIS2_CALL
sandesha2_seq_report_create(
const axutil_env_t *env)
{
sandesha2_seq_report_t *report = NULL;
AXIS2_ENV_CHECK(env, NULL);
report = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_seq_report_t));
report->seq_status = SANDESHA2_SEQ_STATUS_UNKNOWN;
report->seq_direction = SANDESHA2_SEQ_DIRECTION_UNKNOWN;
report->completed_msgs = NULL;
report->internal_seq_id = NULL;
report->seq_id = NULL;
report->completed_msgs = axutil_array_list_create(env, 0);
if(!report->completed_msgs)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
return report;
}
开发者ID:alexis-gruet,项目名称:kt_sandesha2,代码行数:23,代码来源:sequence_report.c
示例14: rp_transport_binding_create
AXIS2_EXTERN rp_transport_binding_t *AXIS2_CALL
rp_transport_binding_create(
const axutil_env_t * env)
{
rp_transport_binding_t *transport_binding = NULL;
AXIS2_ENV_CHECK(env, NULL);
transport_binding = (rp_transport_binding_t *)AXIS2_MALLOC(env->allocator,
sizeof(rp_transport_binding_t));
if(transport_binding == NULL)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
transport_binding->binding_commons = NULL;
transport_binding->transport_token = NULL;
transport_binding->ref = 0;
return transport_binding;
}
开发者ID:alexis-gruet,项目名称:axis2c-trunk,代码行数:23,代码来源:transport_binding.c
示例15: remote_registry_comment_create
AXIS2_EXTERN remote_registry_comment_t* AXIS2_CALL
remote_registry_comment_create(
const axutil_env_t *env)
{
remote_registry_comment_t *comment = NULL;
comment = (remote_registry_comment_t *)AXIS2_MALLOC(env->allocator,
sizeof(remote_registry_comment_t));
if(!comment)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
comment->resource_path = NULL;
comment->comment_path = NULL;
comment->text = NULL;
comment->user = NULL;
comment->date_time = NULL;
return comment;
}
开发者ID:AdrianRys,项目名称:wsf,代码行数:23,代码来源:comment.c
示例16: oxs_sign_part_create
AXIS2_EXTERN oxs_sign_part_t *AXIS2_CALL
oxs_sign_part_create(const axutil_env_t *env)
{
oxs_sign_part_t *sign_part = NULL;
AXIS2_ENV_CHECK(env, NULL);
sign_part = AXIS2_MALLOC(env->allocator, sizeof(oxs_sign_part_t));
if (!sign_part)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
sign_part->id= NULL;
sign_part->digest_mtd = NULL;
sign_part->digest_val = NULL;
sign_part->node = NULL;
sign_part->transforms = NULL;
sign_part->id_name = NULL;
sign_part->sig_ns = NULL;
return sign_part;
}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:23,代码来源:sign_part.c
示例17: trust_rstr_create
AXIS2_EXTERN trust_rstr_t * AXIS2_CALL
trust_rstr_create(
const axutil_env_t *env)
{
trust_rstr_t *rstr = NULL;
rstr = (trust_rstr_t*)AXIS2_MALLOC(env->allocator, sizeof(trust_rstr_t));
rstr->token_type = NULL;
rstr->attr_context = NULL;
rstr->request_type = NULL;
rstr->requested_sec_token = NULL;
rstr->applies_to = NULL;
rstr->requested_attached_ref = NULL;
rstr->requested_unattached_ref = NULL;
rstr->requested_proof_token = NULL;
rstr->entropy = NULL;
rstr->life_time = NULL;
rstr->key_size = -1;
rstr->wst_ns_uri = NULL;
return rstr;
}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:23,代码来源:rstr.c
示例18: rampart_config_create
AXIS2_EXTERN rampart_config_t *AXIS2_CALL
rampart_config_create(
const axutil_env_t *env)
{
rampart_config_t *rampart_config = NULL;
rampart_config = (rampart_config_t *) AXIS2_MALLOC (env->allocator, sizeof (rampart_config_t));
if(!rampart_config)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"[rampart] Unable to create rampart configuration. Insufficient memory.");
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
rampart_config->username = NULL;
rampart_config->password = NULL;
rampart_config->password_type = NULL;
rampart_config->ttl = 0;
rampart_config->saml_tokens = NULL;
rampart_config->issued_token_aquire = NULL;
return rampart_config;
}
开发者ID:alexis-gruet,项目名称:kt_rampart,代码行数:23,代码来源:rampart_config.c
示例19: axiom_soap_fault_code_create
AXIS2_EXTERN axiom_soap_fault_code_t *AXIS2_CALL
axiom_soap_fault_code_create(
const axutil_env_t * env)
{
axiom_soap_fault_code_t *fault_code = NULL;
fault_code = (axiom_soap_fault_code_t *)AXIS2_MALLOC(env->allocator,
sizeof(axiom_soap_fault_code_t));
if(!fault_code)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault code");
return NULL;
}
fault_code->om_ele_node = NULL;
fault_code->subcode = NULL;
fault_code->value = NULL;
fault_code->builder = NULL;
fault_code->soap_version = AXIOM_SOAP_VERSION_NOT_SET;
return fault_code;
}
开发者ID:michaelarnauts,项目名称:wsf,代码行数:23,代码来源:soap_fault_code.c
示例20: axutil_linked_list_create
AXIS2_EXTERN axutil_linked_list_t *AXIS2_CALL
axutil_linked_list_create(
const axutil_env_t *env)
{
axutil_linked_list_t *linked_list = NULL;
AXIS2_ENV_CHECK(env, NULL);
linked_list = AXIS2_MALLOC(env->allocator, sizeof(axutil_linked_list_t));
if (!linked_list)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
return NULL;
}
linked_list->size = 0;
linked_list->mod_count = 0;
linked_list->first = NULL;
linked_list->last = NULL;
return linked_list;
}
开发者ID:cs525-koala,项目名称:eucalyptus-deps,代码行数:23,代码来源:linked_list.c
注:本文中的AXIS2_MALLOC函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论