summaryrefslogtreecommitdiffstats
path: root/src/shared/AtomWriter.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
committerDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
commit3c5931bb13b5f88edcebb375fa6964dde8b85563 (patch)
tree9801897576b7fb9d8a9f700847c670f216fc93b7 /src/shared/AtomWriter.cpp
parentb83ed4f83cf4c9b5054dcf55bea710313c369633 (diff)
downloadingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.gz
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.bz2
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.zip
Report subject with errors to client for more meaningful error messages.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4556 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared/AtomWriter.cpp')
-rw-r--r--src/shared/AtomWriter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/AtomWriter.cpp b/src/shared/AtomWriter.cpp
index 7d600466..80bd0156 100644
--- a/src/shared/AtomWriter.cpp
+++ b/src/shared/AtomWriter.cpp
@@ -272,7 +272,7 @@ AtomWriter::get(const Raul::URI& uri)
}
void
-AtomWriter::response(int32_t id, Status status)
+AtomWriter::response(int32_t id, Status status, const std::string& subject)
{
if (id == -1) {
return;
@@ -282,6 +282,10 @@ AtomWriter::response(int32_t id, Status status)
lv2_atom_forge_blank(&_forge, &msg, next_id(), _uris.patch_Response);
lv2_atom_forge_property_head(&_forge, _uris.patch_request, 0);
lv2_atom_forge_int(&_forge, id);
+ if (!subject.empty() && Raul::URI::is_valid(subject)) {
+ lv2_atom_forge_property_head(&_forge, _uris.patch_subject, 0);
+ lv2_atom_forge_uri(&_forge, subject.c_str(), subject.length());
+ }
lv2_atom_forge_property_head(&_forge, _uris.patch_body, 0);
lv2_atom_forge_int(&_forge, status);
lv2_atom_forge_pop(&_forge, &msg);