summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
index 030b024..973ced9 100644
--- a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -53,5 +53,5 @@ std::string StreamInitiationSerializer::serializePayload(boost::shared_ptr<Strea
if (streamInitiation->getProvidedMethods().size() > 0) {
Form::ref form(new Form(Form::FormType));
- ListSingleFormField::ref field = ListSingleFormField::create();
+ FormField::ref field = boost::make_shared<FormField>(FormField::ListSingleType);
field->setName("stream-method");
foreach(const std::string& method, streamInitiation->getProvidedMethods()) {
@@ -63,5 +63,6 @@ std::string StreamInitiationSerializer::serializePayload(boost::shared_ptr<Strea
else if (!streamInitiation->getRequestedMethod().empty()) {
Form::ref form(new Form(Form::SubmitType));
- ListSingleFormField::ref field = ListSingleFormField::create(streamInitiation->getRequestedMethod());
+ FormField::ref field = boost::make_shared<FormField>(FormField::ListSingleType);
+ field->addValue(streamInitiation->getRequestedMethod());
field->setName("stream-method");
form->addField(field);