ifmap message type is known

This commit is contained in:
Andreas Steffen 2013-03-30 08:22:33 +01:00
parent b02bdc1e06
commit c6f9b1fb1f
3 changed files with 7 additions and 12 deletions

View File

@ -104,8 +104,7 @@ METHOD(tnc_ifmap2_soap_t, newSession, bool,
xmlSetNs(request, this->ns);
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
if (!soap_msg->post(soap_msg, "newSession", request,
"newSessionResult", &result))
if (!soap_msg->post(soap_msg, request, "newSessionResult", &result))
{
soap_msg->destroy(soap_msg);
return FALSE;
@ -143,8 +142,7 @@ METHOD(tnc_ifmap2_soap_t, purgePublisher, bool,
xmlNewProp(request, "ifmap-publisher-id", this->ifmap_publisher_id);
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
success = soap_msg->post(soap_msg, "purgePublisher", request,
"purgePublisherReceived", NULL);
success = soap_msg->post(soap_msg, request, "purgePublisherReceived", NULL);
soap_msg->destroy(soap_msg);
return success;
@ -270,8 +268,7 @@ METHOD(tnc_ifmap2_soap_t, publish_device_ip, bool,
xmlAddChild(update, create_metadata(this, "device-ip"));
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
success = soap_msg->post(soap_msg, "publish", request,
"publishReceived", NULL);
success = soap_msg->post(soap_msg, request, "publishReceived", NULL);
soap_msg->destroy(soap_msg);
return success;

View File

@ -146,8 +146,8 @@ static xmlNodePtr find_child(xmlNodePtr parent, const xmlChar* name)
}
METHOD(tnc_ifmap2_soap_msg_t, post, bool,
private_tnc_ifmap2_soap_msg_t *this, char *request_name, xmlNodePtr request,
char *result_name, xmlNodePtr *result)
private_tnc_ifmap2_soap_msg_t *this, xmlNodePtr request, char *result_name,
xmlNodePtr *result)
{
xmlDocPtr doc;
xmlNodePtr env, body, cur, response;
@ -156,7 +156,7 @@ METHOD(tnc_ifmap2_soap_msg_t, post, bool,
int len;
chunk_t in, out;
DBG2(DBG_TNC, "sending ifmap %s", request_name);
DBG2(DBG_TNC, "sending ifmap %s", request->name);
/* Generate XML Document containing SOAP Envelope */
doc = xmlNewDoc("1.0");

View File

@ -36,13 +36,11 @@ struct tnc_ifmap2_soap_msg_t {
/**
* Post an IF-MAP request in a SOAP-XML message and return a result
*
* @param request_name name of the IF-MAP request
* @param request XML-encoded IF-MAP request
* @param result_name name of the IF-MAP result
* @param result XML-encoded IF-MAP result
*/
bool (*post)(tnc_ifmap2_soap_msg_t *this,
char *request_name, xmlNodePtr request,
bool (*post)(tnc_ifmap2_soap_msg_t *this, xmlNodePtr request,
char *result_name, xmlNodePtr* result);
/**