• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ soap_strdup函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中soap_strdup函数的典型用法代码示例。如果您正苦于以下问题:C++ soap_strdup函数的具体用法?C++ soap_strdup怎么用?C++ soap_strdup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了soap_strdup函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ns__poller_data_read_queue

int
ns__poller_data_read_queue(soap* soap, int sessionID, int count, struct RadarDataInfoArray* result)
{
	DarxendClient* client = client_manager_get_client(sessionID);
	if (!client)
		return die_bad_client(soap);

	RadarDataInfo* infos = darxend_client_read_queue(client, count);
	if (infos)
	{
		result->__size = count;

		result->array = (RadarDataInfo*)soap_malloc(soap, sizeof(RadarDataInfo) * count);
		int i;
		for (i = 0; i < count; i++)
		{
			result->array[i] = infos[i];
			result->array[i].site = soap_strdup(soap, result->array[i].site);
			result->array[i].product = soap_strdup(soap, result->array[i].product);
			free(infos[i].site);
			free(infos[i].product);
		}
		free(infos);
	}
	else
	{
		result->__size = -1;
	}
	return SOAP_OK;
}
开发者ID:darxen,项目名称:Darxen,代码行数:30,代码来源:darxendWebServiceImp.c


示例2: bes_InvalidActivityFaultDOM

struct soap_dom_element*
bes_InvalidActivityFaultDOM(struct soap *s,
        const char *faultstring, const char *message)
{
    struct soap_dom_element *fault, *besdetail, *messageElt;
    
    fault = createBESFaultElement(s, "InvalidActivityIdentifierFault", faultstring, &besdetail);
    if (fault == NULL) {
        return NULL;
    }

    messageElt = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    if (messageElt == NULL) {
        return NULL;
    }
    memset(messageElt, 0, sizeof(struct soap_dom_element));
    
    messageElt->name = soap_strdup(s, "Message");
    messageElt->nstr = soap_strdup(s, BES_NS);
    messageElt->data = soap_strdup(s, message);
    messageElt->prnt = besdetail;
    messageElt->soap = s;
    besdetail->elts = messageElt;
    
    return fault;
}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:26,代码来源:faults.c


示例3: soap_default_xsd__anyType

soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type)
{ soap_default_xsd__anyType(soap, this);
  this->nstr = soap_strdup(soap, nstr);
  this->name = soap_strdup(soap, name);
  this->node = node;
  this->type = type;
}
开发者ID:BioinformaticsArchive,项目名称:GEMBASSY,代码行数:7,代码来源:dom_cpp.cpp


示例4: allocate_fault

static struct SOAP_ENV__Fault*
allocate_fault(struct soap *s,
        const char *faultcode, const char *faultstring)
{
    struct SOAP_ENV__Fault *fault;

    /* require a faultcode */
    if (faultcode == NULL) {
        return NULL;
    }

    fault = (struct SOAP_ENV__Fault*)soap_malloc(s,
            sizeof(struct SOAP_ENV__Fault));
    if (fault == NULL) {
        return NULL;
    }
    soap_default_SOAP_ENV__Fault(s, fault);

    fault->faultcode = soap_strdup(s, faultcode);

    if (faultstring) {
        fault->faultstring = soap_strdup(s, faultstring);
    }

    fault->detail = (struct SOAP_ENV__Detail*)soap_malloc(s,
            sizeof(struct SOAP_ENV__Detail));
    if (fault->detail) {
        soap_default_SOAP_ENV__Detail(s, fault->detail);
    }

    return fault;
}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:32,代码来源:faults.c


示例5: http_da_session_start

static void http_da_session_start(const char *realm, const char *nonce, const char *opaque)
{
  struct http_da_session *session;
  time_t now = time(NULL);

  if (now % 10 == 0) /* don't do this all the time to improve efficiency */
    http_da_session_cleanup();

#ifdef SOAP_DEBUG
  fprintf(stderr, "Starting session realm=%s nonce=%s\n", realm, nonce);
#endif

  MUTEX_LOCK(http_da_session_lock);

  session = (struct http_da_session*)malloc(sizeof(struct http_da_session));
  if (session)
  {
    session->next = http_da_session;
    session->modified = now;
    session->realm = soap_strdup(NULL, realm);
    session->nonce = soap_strdup(NULL, nonce);
    session->opaque = soap_strdup(NULL, opaque);
    session->nc = 0;
    http_da_session = session;
  }

  MUTEX_UNLOCK(http_da_session_lock);
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:28,代码来源:httpda.c


示例6: soap_strdup

soap_dom_attribute::soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data)
{ this->soap = soap;
  this->next = NULL;
  this->nstr = soap_strdup(soap, nstr);
  this->name = soap_strdup(soap, name);
  this->data = soap_strdup(soap, data);
  this->wide = NULL;
}
开发者ID:BioinformaticsArchive,项目名称:GEMBASSY,代码行数:8,代码来源:dom_cpp.cpp


示例7: ONVIF_FAULT

GMI_RESULT ONVIF_FAULT(struct soap *soap_ptr, const char *Object, const char *Value1, const char *Value2, const char *Reason)
{
    //fault code
    soap_ptr->fault = (struct SOAP_ENV__Fault*)soap_malloc_zero(soap_ptr, (sizeof(struct SOAP_ENV__Fault)));
    soap_ptr->fault->SOAP_ENV__Code = (struct SOAP_ENV__Code*)soap_malloc_zero(soap_ptr, (sizeof(struct SOAP_ENV__Code)));
    if (NULL == soap_ptr->fault->SOAP_ENV__Code)
    {
        return GMI_OUT_OF_MEMORY;
    }
    soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Value = soap_strdup(soap_ptr, Object);
    //fault subcode
    soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc_zero(soap_ptr, (sizeof(struct SOAP_ENV__Code)));
    if (NULL == soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode)
    {
        return GMI_OUT_OF_MEMORY;
    }
    soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value = soap_strdup(soap_ptr, Value1);
    //fault subcode subcode
    if (NULL != Value2)
    {
        soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Subcode = (struct SOAP_ENV__Code*)soap_malloc_zero(soap_ptr, (sizeof(struct SOAP_ENV__Code)));
        if (NULL == soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Subcode)
        {
            return GMI_OUT_OF_MEMORY;
        }
        soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Subcode->SOAP_ENV__Value   = soap_strdup(soap_ptr, Value2);
        soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Subcode->SOAP_ENV__Subcode = NULL;
    }
    else
    {
        soap_ptr->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Subcode = NULL;
    }

    soap_ptr->fault->faultcode = NULL;
    soap_ptr->fault->faultstring = NULL;
    soap_ptr->fault->faultactor = NULL;
    soap_ptr->fault->detail = NULL;
    //fault reason
    if (NULL != Reason)
    {
        soap_ptr->fault->SOAP_ENV__Reason = (struct SOAP_ENV__Reason *)soap_malloc_zero(soap_ptr, sizeof(struct SOAP_ENV__Reason));
        if (NULL == soap_ptr->fault->SOAP_ENV__Reason)
        {
            return GMI_OUT_OF_MEMORY;
        }
        soap_ptr->fault->SOAP_ENV__Reason->SOAP_ENV__Text = soap_strdup(soap_ptr, Reason);
    }
    else
    {
        soap_ptr->fault->SOAP_ENV__Reason = NULL;
    }
    soap_ptr->fault->SOAP_ENV__Node = NULL;
    soap_ptr->fault->SOAP_ENV__Role = NULL;
    soap_ptr->fault->SOAP_ENV__Detail = NULL;

    return GMI_SUCCESS;
}
开发者ID:JammyWei,项目名称:ver30,代码行数:57,代码来源:service_utilitly.c


示例8: DBG

static void *dime_write_open(struct soap *soap, const char *id, const char *type, const char *options)
{
	DBG("\n");
	// we can return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment
	struct dime_write_handle *handle = (struct dime_write_handle*)soap_malloc(soap, sizeof(struct dime_write_handle));
	if (!handle)
	{
		soap->error = SOAP_EOM;
		return NULL;
	}


#if 0
	char *name = tempnam(TMPDIR, "data");
	fprintf(stderr, "Saving file %s\n", name);
	handle->name = soap_strdup(soap, name);
	free(name);
#else
	time_t t = time(NULL);
	struct tm tm = *localtime(&t);

	char name[64];
	memset(name, '\0', sizeof(name));

	switch(bkev){
	case EVENT_SET_FILENAME_CONFIG:
		sprintf(name, "configuration-%d-%d-%d-%d-%d-%d.conf",
				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
				tm.tm_hour,	tm.tm_min, tm.tm_sec);
		break;
	case EVENT_SET_FILENAME_FIRMWARE:
		sprintf(name, "firmware-%d-%d-%d-%d-%d-%d.ctfw",
				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
				tm.tm_hour,	tm.tm_min, tm.tm_sec);
		break;
	default:
		sprintf(name, "%d-%d-%d-%d-%d-%d",
				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
				tm.tm_hour,	tm.tm_min, tm.tm_sec);
		break;
	}

	DBG("tmpname: %s\n", name);

	handle->name = soap_strdup(soap, name);
#endif


	handle->fd = fopen(handle->name, "wb");
	if (!handle->fd)
	{
		soap->error = SOAP_EOF; // could not open file for writing
		soap->errnum = errno; // get reason
		return NULL;
	}
	return (void*)handle;
}
开发者ID:eslinux,项目名称:Windows,代码行数:57,代码来源:CenticFirewallApp.cpp


示例9: soap_wsse_add_Security_actor

/**
@fn _wsse__Security* soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
@brief Adds Security header element with actor or role attribute.
@param soap context
@param actor string
@return _wsse__Security object
*/
struct _wsse__Security*
soap_wsse_add_Security_actor(struct soap *soap, const char *actor)
{ _wsse__Security *security = soap_wsse_add_Security(soap);
  DBGFUN1("soap_wsse_add_Security_actor", "actor=%s", actor);
  if (soap->namespaces && !strcmp(soap->namespaces[0].ns, "http://schemas.xmlsoap.org/soap/envelope/"))
    security->SOAP_ENV__actor = soap_strdup(soap, actor);
  else
    security->SOAP_ENV__role = soap_strdup(soap, actor);
  return security;
}
开发者ID:latelee,项目名称:onvif_fw_stl,代码行数:17,代码来源:wsseapi-lite.c


示例10: my_soap_copy_fault

static int my_soap_copy_fault(struct soap *soap, const char *faultcode,
		const char *faultsubcodeQName, const char *faultstring,
		const char *faultdetailXML) {
	char *r = NULL, *s = NULL, *t = NULL;
	if (faultsubcodeQName)
		r = soap_strdup(soap, faultsubcodeQName);
	if (faultstring)
		s = soap_strdup(soap, faultstring);
	if (faultdetailXML)
		t = soap_strdup(soap, faultdetailXML);
	return my_soap_set_error(soap, faultcode, r, s, t, SOAP_FAULT);
}
开发者ID:johnnywww,项目名称:nvtonvifserverc,代码行数:12,代码来源:onvifHandle.c


示例11: soap_strdup

soap_dom_element::soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data)
{ this->soap = soap;
  this->next = NULL;
  this->prnt = NULL;
  this->nstr = soap_strdup(soap, nstr);
  this->name = soap_strdup(soap, name);
  this->data = soap_strdup(soap, data);
  this->wide = NULL;
  this->atts = NULL;
  this->elts = NULL;
  this->node = NULL;
  this->type = 0;
}
开发者ID:hackshields,项目名称:antivirus,代码行数:13,代码来源:dom.c


示例12: jp2s_error

static struct jptype__genericFault* jp2s_error(struct soap *soap, const glite_jp_error_t *err)
{
	struct jptype__genericFault *ret = NULL;
	if (err) {
		ret = soap_malloc(soap,sizeof *ret);
		memset(ret,0,sizeof *ret);
		ret->code = err->code;
		ret->source = soap_strdup(soap,err->source);
		ret->text = soap_strdup(soap,strerror(err->code));
		ret->description = err->desc ? soap_strdup(soap,err->desc) : NULL;
		ret->reason = jp2s_error(soap,err->reason);
	}
	return ret;
}
开发者ID:CESNET,项目名称:glite-jp,代码行数:14,代码来源:ws_fault.c


示例13: createBESFaultElement

static struct soap_dom_element*
createBESFaultElement(struct soap *s, 
        const char *bescode, const char *faultstring,
        struct soap_dom_element **besdetailpp)
{
    struct soap_dom_element *fault, *faultcode, *faultstr;
    struct soap_dom_element *detail, *besdetail;
    
    if (!s || !bescode || !faultstring || !besdetailpp) {
        return NULL;
    }
    
    fault = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    faultcode = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    faultstr = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    detail = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    besdetail = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element));
    if (!fault || !faultcode || !faultstr || !detail || !besdetail) {
        return NULL;
    }
    memset(fault, 0, sizeof(struct soap_dom_element));
    memset(faultcode, 0, sizeof(struct soap_dom_element));
    memset(faultstr, 0, sizeof(struct soap_dom_element));
    memset(detail, 0, sizeof(struct soap_dom_element));
    memset(besdetail, 0, sizeof(struct soap_dom_element));
    
    faultcode->name = soap_strdup(s, "faultcode");
    faultcode->data = (char*)soap_malloc(s, strlen("bes:") + strlen(bescode) + 1);
    sprintf(faultcode->data, "bes:%s", bescode);
    faultcode->prnt = fault;
    faultcode->next = faultstr;
    faultcode->soap = s;
    
    faultstr->name = soap_strdup(s, "faultstring");
    faultstr->data = soap_strdup(s, faultstring);
    faultstr->prnt = fault;
    faultstr->next = detail;
    faultstr->soap = s;
    
    detail->name = soap_strdup(s, "detail");
    detail->elts = besdetail;
    detail->prnt = fault;
    detail->soap = s;

    besdetail->name = soap_strdup(s, bescode);
    besdetail->nstr = soap_strdup(s, BES_NS);
    besdetail->prnt = detail;
    besdetail->soap = s;
    
    fault->nstr = soap_strdup(s, BES_NS);
    fault->name = soap_strdup(s, "Fault");
    fault->elts = faultcode;
    fault->soap = s;
    
    *besdetailpp = besdetail;
    
    return fault;
}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:58,代码来源:faults.c


示例14: ns1__executeCommand

/*
Code used for generating stubs:

int ns1__executeCommand(char* command, char** result);
*/
int ns1__executeCommand(soap* soap, char* command, char** result)
{
    // security check
    if (!soap->userid || !soap->passwd)
    {
        DEBUG_LOG("MaNGOSsoap: Client didn't provide login information");
        return 401;
    }

    uint32 accountId = sAccountMgr.GetId(soap->userid);
    if(!accountId)
    {
        DEBUG_LOG("MaNGOSsoap: Client used invalid username '%s'", soap->userid);
        return 401;
    }

    if(!sAccountMgr.CheckPassword(accountId, soap->passwd))
    {
        DEBUG_LOG("MaNGOSsoap: invalid password for account '%s'", soap->userid);
        return 401;
    }

    if(sAccountMgr.GetSecurity(accountId) < SECURITY_ADMINISTRATOR)
    {
        DEBUG_LOG("MaNGOSsoap: %s's gmlevel is too low", soap->userid);
        return 403;
    }

    if(!command || !*command)
        return soap_sender_fault(soap, "Command mustn't be empty", "The supplied command was an empty string");

    DEBUG_LOG("MaNGOSsoap: got command '%s'", command);
    SOAPCommand connection;

    // commands are executed in the world thread. We have to wait for them to be completed
    {
        // CliCommandHolder will be deleted from world, accessing after queueing is NOT save
        CliCommandHolder* cmd = new CliCommandHolder(accountId, SECURITY_CONSOLE, &connection, command, &SOAPCommand::print, &SOAPCommand::commandFinished);
        sWorld.QueueCliCommand(cmd);
    }

    // wait for callback to complete command

    int acc = connection.pendingCommands.acquire();
    if(acc)
    {
        sLog.outError("MaNGOSsoap: Error while acquiring lock, acc = %i, errno = %u", acc, errno);
    }

    // alright, command finished

    char* printBuffer = soap_strdup(soap, connection.m_printBuffer.c_str());
    if(connection.hasCommandSucceeded())
    {
        *result = printBuffer;
        return SOAP_OK;
    }
    else
        return soap_sender_fault(soap, printBuffer, printBuffer);
}
开发者ID:Nedj,项目名称:Mysteria4,代码行数:65,代码来源:MaNGOSsoap.cpp


示例15: bes_UnsupportedFault

struct SOAP_ENV__Fault*
bes_UnsupportedFault(struct soap* s,
        const char *faultstring, const char *element)
{
    struct SOAP_ENV__Fault *fault;

    fault = allocate_fault(s, BES_FAULT_UNSUPPORTED, faultstring);
    if (fault == NULL) {
        return NULL;
    }

    if (fault->detail) {
        fault->detail->bes__UnsupportedFeatureFault
                = (struct bes__UnsupportedFeatureFaultType*)soap_malloc(s,
                        sizeof(struct bes__UnsupportedFeatureFaultType));
        if (fault->detail->bes__UnsupportedFeatureFault) {
            memset(fault->detail->bes__UnsupportedFeatureFault, 0,
                    sizeof(struct bes__UnsupportedFeatureFaultType));
        }
        fault->detail->bes__UnsupportedFeatureFault->Feature = (char**)soap_malloc(s, sizeof(char*));
        if (!fault->detail->bes__UnsupportedFeatureFault->Feature) {
            return NULL;
        }
        *fault->detail->bes__UnsupportedFeatureFault->Feature = soap_strdup(s, 
                element?element:"");
        if (!*fault->detail->bes__UnsupportedFeatureFault->Feature) {
            return NULL;
        }
        fault->detail->bes__UnsupportedFeatureFault->__sizeFeature = 1;
    }

    return fault;
}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:33,代码来源:faults.c


示例16: soap_malloc

void *mime_server_write_open(struct soap *soap, void *unused_handle,
		const char *id, const char *type, const char *description,
		enum soap_mime_encoding encoding) { /* Note: the 'unused_handle' is always NULL */
	/* Return NULL without setting soap->error if we don't want to use the streaming callback for this DIME attachment */
	const char *file;
	struct mime_server_handle *handle = soap_malloc(soap,
			sizeof(struct mime_server_handle));
	if (!handle) {
		soap->error = SOAP_EOM;
		return NULL;
	}
	/* Create a new file */
	file = tempnam(TMPDIR, "data");
	/* The file name is also the key */
	handle->key = soap_strdup(soap, file);
	handle->fd = fopen(file, "wb");
	free((void*) file);
	if (!handle->fd) {
		soap->error = soap_sender_fault(soap,
				"Cannot save data to file", handle->key);
		soap->errnum = errno; /* get reason */
		return NULL;
	}
	fprintf(stderr, "Saving file %s type %s\n", handle->key,
			type ? type : "");
	return (void*) handle;
}
开发者ID:awesomeleo,项目名称:onvif-ipcam,代码行数:27,代码来源:onvif_server.c


示例17: bes_InvalidRequestFault

struct SOAP_ENV__Fault*
bes_InvalidRequestFault(struct soap* s,
        const char *faultstring, const char *element)
{
    struct SOAP_ENV__Fault *fault;

    fault = allocate_fault(s, BES_FAULT_INVALID_REQUEST, faultstring);
    if (fault == NULL) {
        return NULL;
    }

    if (fault->detail) {
        fault->detail->bes__InvalidRequestMessageFault
                = (struct bes__InvalidRequestMessageFaultType*)soap_malloc(s,
                        sizeof(struct bes__InvalidRequestMessageFaultType));
        if (fault->detail->bes__InvalidRequestMessageFault) {
            memset(fault->detail->bes__InvalidRequestMessageFault, 0,
                    sizeof(struct bes__InvalidRequestMessageFaultType));
            fault->detail->bes__InvalidRequestMessageFault->InvalidElement = (char**)soap_malloc(s, sizeof(char*));
            if (!fault->detail->bes__InvalidRequestMessageFault->InvalidElement) {
                return NULL;
            }
            *fault->detail->bes__InvalidRequestMessageFault->InvalidElement = soap_strdup(s, 
                    element?element:"");
            if (!*fault->detail->bes__InvalidRequestMessageFault->InvalidElement) {
                return NULL;
            }
            fault->detail->bes__InvalidRequestMessageFault->__sizeInvalidElement = 1;
        }
    }

    return fault;
}
开发者ID:saga-project,项目名称:saga-cpp-adaptor-bes,代码行数:33,代码来源:faults.c


示例18: MyFeedRefresh

int MyFeedRefresh(struct soap *soap, glite_jpis_context_t ctx, long int uniqueid, const char *dest, int status, const char *feedid)
{
	struct _jpelem__FeedIndexRefresh		in;
	struct _jpelem__FeedIndexRefreshResponse 	out;

	lprintf("(%ld) for %s called, status = %d\n", uniqueid, feedid, status);

	if (refresh_gsoap(ctx, soap) != 0)
		return glite_jpis_stack_error(ctx->jpctx, EINVAL, "can't refresh credentials");

	soap_begin(soap);
	memset(&in, 0, sizeof(in));
	in.feedId = soap_strdup(soap, feedid);
	if (check_fault(soap,soap_call___jpsrv__FeedIndexRefresh(soap,dest,"", &in, &out)) != 0) {
		fprintf(stderr, "\n");
		glite_jpis_unlockFeed(ctx, uniqueid);
		glite_jpis_stack_error(ctx->jpctx, EIO, "soap_call___jpsrv__FeedRefresh() returned error %d", soap->error);
		soap_end(soap);
		return EIO;
	}
	else {
		status &= (~GLITE_JP_IS_STATE_ERROR);
		lprintf("(%ld) FeedId: %s\n", uniqueid, feedid);
		lprintf("(%ld) Expires: %s", uniqueid, ctime(&out.feedExpires));
		glite_jpis_initFeed(ctx, uniqueid, feedid, time(NULL) + (out.feedExpires - time(NULL)) / 2, status);
		glite_jpis_unlockFeed(ctx, uniqueid);
	}

	soap_end(soap);
	return 0;
}
开发者ID:CESNET,项目名称:glite-jp,代码行数:31,代码来源:soap_ps_calls.c


示例19: glite_delegation_destroy

int glite_delegation_destroy(glite_delegation_ctx *ctx, const char *delegationID)
{
    char *sdelegationID = "";
    struct delegation__destroyResponse dest_resp;

    if(!ctx)
        return -1;

    /* error is already set */
    if (!ctx->soap) 
        return -1;

    if (delegationID)
    {
        sdelegationID = soap_strdup(ctx->soap, delegationID);
        if (!sdelegationID)
        {
            glite_delegation_set_error(ctx, "glite_delegation_destroy: soap_strdup()"
                           " of delegationID failed!");
            return -1;
        }
    }
    
    if (SOAP_OK != soap_call_delegation__destroy(ctx->soap, ctx->endpoint, NULL,
                                                  sdelegationID, &dest_resp))
    {
            _fault_to_error(ctx, __func__);
            return -1;
    }

    return 0;
}
开发者ID:ic-hep,项目名称:emi3,代码行数:32,代码来源:delegation_simple_api.c


示例20: zkcfg__getAllKeys

int zkcfg__getAllKeys(struct soap *soap, void *notused, struct zkcfg__Keys *keys)
{
	struct dbhlpColumn desc[1] = {
		{ { 0 }, DBT_STRING },
	};
    sqlite3 *db = db_get();
	struct dbhlpColumn **all = 0;
	int rows = 0, i;

	db_exec_select2(db, "SELECT key FROM config", desc, 1, &all, &rows);
	if (rows > 0) {
		keys->__ptr = (char**)soap_malloc(soap, rows * sizeof(char*));
		keys->__size = rows;

		for (i = 0; i < rows; i++) {
			keys->__ptr[i] = soap_strdup(soap, all[i][0].data.s);
		}
	}
	else {
		keys->__ptr = 0;
		keys->__size = 0;
	}

	db_free_select2(desc, 1, all, rows);
    db_release(db);
    
	return SOAP_OK;
}
开发者ID:sunkwei,项目名称:sysmgrt,代码行数:28,代码来源:zkcfgimpl.c



注:本文中的soap_strdup函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ soap_url函数代码示例发布时间:2022-05-30
下一篇:
C++ soap_set_version函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap