Re: [2/6] wsdapi: Add code to create SOAP envelope from header and body elements. [try 2]
+static void remove_attribute(WSDXML_ELEMENT *parent, WSDXML_ATTRIBUTE *attribute) +{ + WSDXML_ATTRIBUTE *curAttrib; + + /* Find the last attribute and add this as the next one */ + curAttrib = parent->FirstAttribute; + + if (curAttrib == attribute) + { + parent->FirstAttribute = NULL; + } I think this should be parent->FirstAttribute = curAttrib->Next. + } + else if (curNode->Type == TextType) + { + textNode = WSDAllocateLinkedMemory(newElement, sizeof(WSDXML_TEXT)); + if (textNode == NULL) goto cleanup; + + textNode->Node.Next = NULL; + textNode->Node.Parent = newElement; + textNode->Node.Type = TextType; + textNode->Text = duplicate_string(textNode, ((WSDXML_TEXT *)curNode)->Text); + if (textNode->Text == NULL) goto cleanup; + } You still don't seem to be adding the new text node to newElement.
On 02/08/2017 19:17, Vincent Povirk wrote:
I think this should be parent->FirstAttribute = curAttrib->Next.
Thanks.
You still don't seem to be adding the new text node to newElement.
Ah, I had corrected the memory allocation parenting, but not the actual nodes. This is now fixed in my new revision. Thanks, -- Owen Rudge http://www.owenrudge.net/
participants (2)
-
Owen Rudge -
Vincent Povirk