Permalink
Browse files

jabber pubsub plugin:

allows arbitrary node_types in pubsub:create.  Previously  only  "flat" was accepted.

SVN Revision: 1030
  • Loading branch information...
1 parent b3a4e11 commit 92f6ebf0a024b93d6057725cdc040c7a4062791c @ppolv ppolv committed Jul 2, 2009
Showing with 6 additions and 6 deletions.
  1. +4 −4 src/tsung/ts_jabber_common.erl
  2. +1 −1 src/tsung_controller/ts_config_jabber.erl
  3. +1 −1 tsung-1.0.dtd
@@ -478,10 +478,10 @@ pubsub_node_attr([$/|AbsNode], _Domain, _Username) ->
pubsub_node_attr(Node, Domain, Username) ->
[" node='/home/", Domain, "/", Username, "/", Node,"'"].
-pubsub_node_type('flat') ->
- " type='flat' ";
-pubsub_node_type(_) ->
- "".
+pubsub_node_type(undefined) ->
+ "";
+pubsub_node_type(Type) when is_list(Type) ->
+ [" type='", Type, "' "].
%%%----------------------------------------------------------------------
%%% Func: subscribe_pubsub_node/4
@@ -66,7 +66,7 @@ parse_config(Element = #xmlElement{name=jabber},
"" -> user_root;
X -> X
end,
- NodeType = ts_config:getAttr(atom, Element#xmlElement.attributes, 'node_type', undefined),
+ NodeType = ts_config:getAttr(string, Element#xmlElement.attributes, 'node_type', undefined),
%% This specify where the node identified in the 'node' attribute is located.
%% If node is undefined (no node attribute)
%% -> we don't specify the node, let the server choose one for us.
View
@@ -183,7 +183,7 @@ repeat | if )*>
nick CDATA #IMPLIED
room CDATA #IMPLIED
node CDATA #IMPLIED
- node_type (flat) #IMPLIED >
+ node_type CDATA #IMPLIED >
<!ELEMENT pgsql (#PCDATA) >
<!ATTLIST pgsql

0 comments on commit 92f6ebf

Please sign in to comment.