View | Details | Raw Unified | Return to bug 212410
Collapse All | Expand All

(-)files/patch-adhoc.erl (+29 lines)
Line 0 Link Here
1
--- src/adhoc.erl.orig	2016-09-07 00:57:41 UTC
2
+++ src/adhoc.erl
3
@@ -41,7 +41,7 @@
4
 %% Parse an ad-hoc request.  Return either an adhoc_request record or
5
 %% an {error, ErrorType} tuple.
6
 %%
7
--spec(parse_request/1 ::
8
+-spec(parse_request
9
 (
10
   IQ :: iq_request())
11
     -> adhoc_response()
12
@@ -88,7 +88,7 @@ find_xdata_el1([_ | Els]) -> find_xdata_
13
 %% record, filling in values for language, node and session id from
14
 %% the request.
15
 %%
16
--spec(produce_response/2 ::
17
+-spec(produce_response
18
 (
19
   Adhoc_Request  :: adhoc_request(),
20
   Adhoc_Response :: adhoc_response())
21
@@ -104,7 +104,7 @@ produce_response(#adhoc_request{lang = L
22
     }).
23
 
24
 %%
25
--spec(produce_response/1 ::
26
+-spec(produce_response
27
 (
28
   Adhoc_Response::adhoc_response())
29
     -> Xmlel::xmlel()
(-)files/patch-cyrsasl.erl (+38 lines)
Line 0 Link Here
1
--- src/cyrsasl.erl.orig	2016-09-07 00:20:18 UTC
2
+++ src/cyrsasl.erl
3
@@ -88,7 +88,7 @@ start() ->
4
     ok.
5
 
6
 %%
7
--spec(register_mechanism/3 ::
8
+-spec(register_mechanism
9
 (
10
   Mechanim     :: mechanism(),
11
   Module       :: module(),
12
@@ -139,7 +139,7 @@ check_credentials(_State, Props) ->
13
       _LUser -> ok
14
     end.
15
 
16
--spec(listmech/1 ::
17
+-spec(listmech
18
 (
19
   Host ::binary())
20
     -> Mechanisms::mechanisms()
21
@@ -213,7 +213,7 @@ server_step(State, ClientIn) ->
22
 %% Remove the anonymous mechanism from the list if not enabled for the given
23
 %% host
24
 %%
25
--spec(filter_anonymous/2 ::
26
+-spec(filter_anonymous
27
 (
28
   Host  :: binary(),
29
   Mechs :: mechanisms())
30
@@ -226,7 +226,7 @@ filter_anonymous(Host, Mechs) ->
31
       false -> Mechs -- [<<"ANONYMOUS">>]
32
     end.
33
 
34
--spec(is_disabled/1 ::
35
+-spec(is_disabled
36
 (
37
   Mechanism :: mechanism())
38
     -> boolean()
(-)files/patch-ejabberd__config.erl (+11 lines)
Line 0 Link Here
1
--- src/ejabberd_config.erl.orig	2016-09-07 00:23:10 UTC
2
+++ src/ejabberd_config.erl
3
@@ -90,7 +90,7 @@ hosts_to_start(State) ->
4
 
5
 %% @private
6
 %% At the moment, these functions are mainly used to setup unit tests.
7
--spec(start/2 :: (Hosts :: [binary()], Opts :: [acl:acl() | local_config()]) -> ok).
8
+-spec(start (Hosts :: [binary()], Opts :: [acl:acl() | local_config()]) -> ok).
9
 start(Hosts, Opts) ->
10
     mnesia_init(),
11
     set_opts(set_hosts_in_options(Hosts, #state{opts = Opts})).
(-)files/patch-fxml.erl (+209 lines)
Line 0 Link Here
1
--- deps/fast_xml/src/fxml.erl.orig	2016-09-06 16:17:10 UTC
2
+++ deps/fast_xml/src/fxml.erl 
3
@@ -48,7 +48,7 @@ load_nif() ->
4
     end.
5
 
6
 %%
7
--spec(element_to_binary/1 ::
8
+-spec(element_to_binary
9
 (
10
   El :: xmlel() | cdata())
11
     -> binary()
12
@@ -69,7 +69,7 @@ crypt(S) ->
13
        || <<C>> <= S >>.
14
 
15
 %%
16
--spec(remove_cdata_p/1 ::
17
+-spec(remove_cdata_p
18
 (
19
   El :: xmlel() | cdata())
20
     -> boolean()
21
@@ -79,7 +79,7 @@ remove_cdata_p(#xmlel{}) -> true;
22
 remove_cdata_p(_) -> false.
23
 
24
 %%
25
--spec(remove_cdata/1 ::
26
+-spec(remove_cdata
27
 (
28
   L :: [xmlel() | cdata()])
29
     -> [xmlel()]
30
@@ -90,7 +90,7 @@ remove_cdata(L) -> [E || E <- L, remove_
31
 %% This function is intended to remove subtags based on a name and an
32
 %% attribute, usually an xmlns attribute for a specific XMPP
33
 %% extension.
34
--spec(remove_subtags/3 ::
35
+-spec(remove_subtags
36
 (
37
   Xmlel :: xmlel(),
38
   Name  :: binary(),
39
@@ -104,7 +104,7 @@ remove_subtags(#xmlel{name = TagName, at
40
         children = remove_subtags1(Els, [], Name, Attr)}.
41
 
42
 %%
43
--spec(remove_subtags1/4 ::
44
+-spec(remove_subtags1
45
 (
46
   Els    :: [xmlel() | cdata()],
47
   NewEls :: [xmlel()],
48
@@ -129,7 +129,7 @@ remove_subtags1([El | Els], NewEls, Name
49
       _ -> remove_subtags1(Els, [El | NewEls], Name, Attr)
50
     end.
51
 
52
--spec(get_cdata/1 ::
53
+-spec(get_cdata
54
 (
55
   L :: [xmlel() | cdata()])
56
     -> binary()
57
@@ -138,7 +138,7 @@ remove_subtags1([El | Els], NewEls, Name
58
 get_cdata(L) ->
59
     (iolist_to_binary(get_cdata(L, <<"">>))).
60
 
61
--spec(get_cdata/2 ::
62
+-spec(get_cdata
63
 (
64
   L :: [xmlel() | cdata()],
65
   S :: binary() | iolist())
66
@@ -150,7 +150,7 @@ get_cdata([{xmlcdata, CData} | L], S) ->
67
 get_cdata([_ | L], S) -> get_cdata(L, S);
68
 get_cdata([], S) -> S.
69
 
70
--spec(get_tag_cdata/1 ::
71
+-spec(get_tag_cdata
72
 (
73
   Xmlel :: xmlel())
74
     -> binary()
75
@@ -159,7 +159,7 @@ get_cdata([], S) -> S.
76
 get_tag_cdata(#xmlel{children = Els}) -> get_cdata(Els).
77
 
78
 %%
79
--spec(get_attr/2 ::
80
+-spec(get_attr
81
 (
82
   AttrName :: binary(),
83
   Attrs    :: [attr()])
84
@@ -174,7 +174,7 @@ get_attr(AttrName, Attrs) ->
85
     end.
86
 
87
 %%
88
--spec(get_attr_s/2 ::
89
+-spec(get_attr_s
90
 (
91
   AttrName :: binary(),
92
   Attrs    :: [attr()])
93
@@ -188,7 +188,7 @@ get_attr_s(AttrName, Attrs) ->
94
     end.
95
 
96
 %%
97
--spec(get_tag_attr/2 ::
98
+-spec(get_tag_attr
99
 (
100
   AttrName :: binary(),
101
   Xmlel    :: xmlel())
102
@@ -200,7 +200,7 @@ get_tag_attr(AttrName, #xmlel{attrs = At
103
     get_attr(AttrName, Attrs).
104
 
105
 %%
106
--spec(get_tag_attr_s/2 ::
107
+-spec(get_tag_attr_s
108
 (
109
   AttrName :: binary(),
110
   Xmlel    :: xmlel())
111
@@ -211,7 +211,7 @@ get_tag_attr_s(AttrName, #xmlel{attrs = 
112
     get_attr_s(AttrName, Attrs).
113
 
114
 %%
115
--spec(get_subtag/2 ::
116
+-spec(get_subtag
117
 (
118
   Xmlel :: xmlel(),
119
   Name  :: binary())
120
@@ -222,7 +222,7 @@ get_subtag(#xmlel{children = Els}, Name)
121
     get_subtag1(Els, Name).
122
 
123
 %%
124
--spec(get_subtag1/2 ::
125
+-spec(get_subtag1
126
 (
127
   Els  :: [xmlel() | cdata()],
128
   Name :: binary())
129
@@ -236,7 +236,7 @@ get_subtag1( [El | Els], Name) ->
130
     end;
131
 get_subtag1([], _) -> false.
132
 
133
--spec(get_subtags/2 ::
134
+-spec(get_subtags
135
 (
136
   Xmlel :: xmlel(),
137
   Name  :: binary())
138
@@ -255,7 +255,7 @@ get_subtags1([El | Els], Name, Acc) ->
139
     end.
140
 
141
 %%
142
--spec(get_subtag_with_xmlns/3 ::
143
+-spec(get_subtag_with_xmlns
144
 (
145
   Xmlel :: xmlel(),
146
   Name  :: binary(),
147
@@ -267,7 +267,7 @@ get_subtag_with_xmlns(#xmlel{children = 
148
     get_subtag_with_xmlns1(Els, Name, XMLNS).
149
 
150
 %%
151
--spec(get_subtag_with_xmlns1/3 ::
152
+-spec(get_subtag_with_xmlns1
153
 (
154
   Els  :: [xmlel() | cdata()],
155
   Name :: binary(),
156
@@ -290,7 +290,7 @@ get_subtag_with_xmlns1([El | Els], Name,
157
 get_subtag_with_xmlns1([], _, _) ->
158
     false.
159
 
160
--spec(get_subtags_with_xmlns/3 ::
161
+-spec(get_subtags_with_xmlns
162
 (
163
   Xmlel :: xmlel(),
164
   Name  :: binary(),
165
@@ -317,7 +317,7 @@ get_subtags_with_xmlns1([El | Els], Name
166
     end.
167
 
168
 %%
169
--spec(get_subtag_cdata/2 ::
170
+-spec(get_subtag_cdata
171
 (
172
   Tag  :: xmlel(),
173
   Name :: binary())
174
@@ -331,7 +331,7 @@ get_subtag_cdata(Tag, Name) ->
175
     end.
176
 
177
 %%
178
--spec(append_subtags/2 ::
179
+-spec(append_subtags
180
 (
181
   Xmlel    :: xmlel(),
182
   SubTags2 :: [xmlel() | cdata()])
183
@@ -342,7 +342,7 @@ append_subtags(#xmlel{name = Name, attrs
184
     #xmlel{name = Name, attrs = Attrs, children = SubTags1 ++ SubTags2}.
185
 
186
 %%
187
--spec(get_path_s/2 ::
188
+-spec(get_path_s
189
 (
190
   El   :: xmlel(),
191
   Path :: [{elem, Name::binary()}
192
@@ -363,7 +363,7 @@ get_path_s(El, [{attr, Name}]) ->
193
 get_path_s(El, [cdata]) -> get_tag_cdata(El).
194
 
195
 %%
196
--spec(replace_tag_attr/3 ::
197
+-spec(replace_tag_attr
198
 (
199
   Name  :: binary(),
200
   Value :: binary(),
201
@@ -381,7 +381,7 @@ replace_tag_attr(Name, Value, Xmlel) ->
202
     }.
203
 
204
 
205
--spec(replace_subtag/2 ::
206
+-spec(replace_subtag
207
 (
208
   Tag   :: xmlel(),
209
   Xmlel :: xmlel())
(-)files/patch-jlib.erl (+56 lines)
Line 0 Link Here
1
--- src/jlib.erl.orig	2016-09-07 00:53:26 UTC
2
+++ src/jlib.erl
3
@@ -306,7 +306,7 @@ get_iq_namespace(#xmlel{name = <<"iq">>,
4
 get_iq_namespace(_) -> <<"">>.
5
 
6
 %%
7
--spec(iq_query_info/1 ::
8
+-spec(iq_query_info
9
 (
10
   Xmlel :: xmlel())
11
     -> iq_request() | 'reply' | 'invalid' | 'not_iq'
12
@@ -316,7 +316,7 @@ get_iq_namespace(_) -> <<"">>.
13
 iq_query_info(El) -> iq_info_internal(El, request).
14
 
15
 %%
16
--spec(iq_query_or_response_info/1 ::
17
+-spec(iq_query_or_response_info
18
 (
19
   Xmlel :: xmlel())
20
     -> iq_request() | iq_reply() | 'reply' | 'invalid' | 'not_iq'
21
@@ -372,7 +372,7 @@ iq_type_to_string(get) -> <<"get">>;
22
 iq_type_to_string(result) -> <<"result">>;
23
 iq_type_to_string(error) -> <<"error">>.
24
 
25
--spec(iq_to_xml/1 ::
26
+-spec(iq_to_xml
27
 (
28
   IQ :: iq())
29
     -> xmlel()
30
@@ -390,7 +390,7 @@ iq_to_xml(#iq{id = ID, type = Type, sub_
31
 		  children = SubEl}
32
     end.
33
 
34
--spec(parse_xdata_submit/1 ::
35
+-spec(parse_xdata_submit
36
 (
37
   El :: xmlel())
38
     -> [{Var::binary(), Values::[binary()]}]
39
@@ -408,7 +408,7 @@ parse_xdata_submit(#xmlel{attrs = Attrs,
40
             invalid
41
     end.
42
 
43
--spec(parse_xdata_fields/2 ::
44
+-spec(parse_xdata_fields
45
 (
46
   Xmlels :: [xmlel() | cdata()],
47
   Res    :: [{Var::binary(), Values :: [binary()]}])
48
@@ -428,7 +428,7 @@ parse_xdata_fields([#xmlel{name = <<"fie
49
 parse_xdata_fields([_ | Els], Res) ->
50
     parse_xdata_fields(Els, Res).
51
 
52
--spec(parse_xdata_values/2 ::
53
+-spec(parse_xdata_values
54
 (
55
   Xmlels :: [xmlel() | cdata()],
56
   Res    :: [binary()])
(-)files/patch-lager__transform.erl (+25 lines)
Line 0 Link Here
1
--- deps/lager/src/lager_transform.erl.orig	2016-09-07 00:14:25 UTC
2
+++ deps/lager/src/lager_transform.erl
3
@@ -59,15 +59,17 @@ walk_ast(Acc, [{function, Line, Name, Ar
4
     walk_ast([{function, Line, Name, Arity,
5
                 walk_clauses([], Clauses)}|Acc], T);
6
 walk_ast(Acc, [{attribute, _, record, {Name, Fields}}=H|T]) ->
7
-    FieldNames = lists:map(fun({record_field, _, {atom, _, FieldName}}) ->
8
-                FieldName;
9
-            ({record_field, _, {atom, _, FieldName}, _Default}) ->
10
-                FieldName
11
-        end, Fields),
12
+FieldNames = lists:map(fun record_field_name/1, Fields),
13
     stash_record({Name, FieldNames}),
14
     walk_ast([H|Acc], T);
15
 walk_ast(Acc, [H|T]) ->
16
     walk_ast([H|Acc], T).
17
+record_field_name({record_field, _, {atom, _, FieldName}}) ->
18
+    FieldName;
19
+record_field_name({record_field, _, {atom, _, FieldName}, _Default}) ->
20
+    FieldName;
21
+record_field_name({typed_record_field, Field, _Type}) ->
22
+    record_field_name(Field).
23
 
24
 walk_clauses(Acc, []) ->
25
     lists:reverse(Acc);
(-)files/patch-mod__pubsub.erl (+317 lines)
Line 0 Link Here
1
--- src/mod_pubsub.erl.orig	2016-09-07 00:45:01 UTC
2
+++ src/mod_pubsub.erl
3
@@ -232,7 +232,7 @@ stop(Host) ->
4
 %%                         {stop, Reason}
5
 %% Description: Initiates the server
6
 %%--------------------------------------------------------------------
7
--spec(init/1 ::
8
+-spec(init
9
     (
10
 	[binary() | [{_,_}],...])
11
     -> {'ok',state()}
12
@@ -478,7 +478,7 @@ send_loop(State) ->
13
 %% disco hooks handling functions
14
 %%
15
 
16
--spec(disco_local_identity/5 ::
17
+-spec(disco_local_identity
18
     (
19
 	Acc    :: [xmlel()],
20
 	_From  :: jid(),
21
@@ -500,7 +500,7 @@ disco_local_identity(Acc, _From, To, <<>
22
 disco_local_identity(Acc, _From, _To, _Node, _Lang) ->
23
     Acc.
24
 
25
--spec(disco_local_features/5 ::
26
+-spec(disco_local_features
27
     (
28
 	Acc    :: [xmlel()],
29
 	_From  :: jid(),
30
@@ -526,7 +526,7 @@ disco_local_items(Acc, _From, _To, _Node
31
 %    when is_binary(Node) ->
32
 %    disco_sm_identity(Acc, From, To, iolist_to_binary(Node),
33
 %                      Lang);
34
--spec(disco_sm_identity/5 ::
35
+-spec(disco_sm_identity
36
     (
37
 	Acc  :: empty | [xmlel()],
38
 	From :: jid(),
39
@@ -569,7 +569,7 @@ disco_identity(Host, Node, From) ->
40
 	_ -> []
41
     end.
42
 
43
--spec(disco_sm_features/5 ::
44
+-spec(disco_sm_features
45
     (
46
 	Acc  :: empty | {result, Features::[Feature::binary()]},
47
 	From :: jid(),
48
@@ -605,7 +605,7 @@ disco_features(Host, Node, From) ->
49
 	_ -> []
50
     end.
51
 
52
--spec(disco_sm_items/5 ::
53
+-spec(disco_sm_items
54
     (
55
 	Acc  :: empty | {result, [xmlel()]},
56
 	From :: jid(),
57
@@ -625,7 +625,7 @@ disco_sm_items({result, OtherItems}, Fro
58
 	    disco_items(jid:tolower(jid:remove_resource(To)), Node, From))};
59
 disco_sm_items(Acc, _From, _To, _Node, _Lang) -> Acc.
60
 
61
--spec(disco_items/3 ::
62
+-spec(disco_items
63
     (
64
 	Host :: mod_pubsub:host(),
65
 	Node :: mod_pubsub:nodeId(),
66
@@ -845,7 +845,7 @@ handle_call(stop, _From, State) ->
67
 %% @private
68
 handle_cast(_Msg, State) -> {noreply, State}.
69
 
70
--spec(handle_info/2 ::
71
+-spec(handle_info
72
     (
73
 	_     :: {route, From::jid(), To::jid(), Packet::xmlel()},
74
 	State :: state())
75
@@ -933,7 +933,7 @@ terminate(_Reason,
76
 %% @private
77
 code_change(_OldVsn, State, _Extra) -> {ok, State}.
78
 
79
--spec(do_route/7 ::
80
+-spec(do_route
81
     (
82
 	ServerHost :: binary(),
83
 	Access     :: atom(),
84
@@ -1130,7 +1130,7 @@ iq_disco_info(Host, SNode, From, Lang) -
85
 	    node_disco_info(Host, Node, From)
86
     end.
87
 
88
--spec(iq_disco_items/4 ::
89
+-spec(iq_disco_items
90
     (
91
 	Host   :: mod_pubsub:host(),
92
 	Node   :: <<>> | mod_pubsub:nodeId(),
93
@@ -1200,7 +1200,7 @@ iq_disco_items(Host, Item, From, RSM) ->
94
 	    end
95
     end.
96
 
97
--spec(iq_sm/3 ::
98
+-spec(iq_sm
99
     (
100
 	From :: jid(),
101
 	To   :: jid(),
102
@@ -1231,7 +1231,7 @@ iq_get_vcard(Lang) ->
103
 		    <<(translate:translate(Lang, <<"ejabberd Publish-Subscribe module">>))/binary,
104
 			"\nCopyright (c) 2004-2016 ProcessOne">>}]}].
105
 
106
--spec(iq_pubsub/6 ::
107
+-spec(iq_pubsub
108
     (
109
 	Host       :: mod_pubsub:host(),
110
 	ServerHost :: binary(),
111
@@ -1247,7 +1247,7 @@ iq_get_vcard(Lang) ->
112
 iq_pubsub(Host, ServerHost, From, IQType, SubEl, Lang) ->
113
     iq_pubsub(Host, ServerHost, From, IQType, SubEl, Lang, all, plugins(Host)).
114
 
115
--spec(iq_pubsub/8 ::
116
+-spec(iq_pubsub
117
     (
118
 	Host       :: mod_pubsub:host(),
119
 	ServerHost :: binary(),
120
@@ -1357,7 +1357,7 @@ iq_pubsub(Host, ServerHost, From, IQType
121
     end.
122
 
123
 
124
--spec(iq_pubsub_owner/6 ::
125
+-spec(iq_pubsub_owner
126
     (
127
 	Host       :: mod_pubsub:host(),
128
 	ServerHost :: binary(),
129
@@ -1791,7 +1791,7 @@ update_auth(Host, Node, Type, Nidx, Subs
130
 %%<li>nodetree create_node checks if nodeid already exists</li>
131
 %%<li>node plugin create_node just sets default affiliation/subscription</li>
132
 %%</ul>
133
--spec(create_node/5 ::
134
+-spec(create_node
135
     (
136
 	Host          :: mod_pubsub:host(),
137
 	ServerHost    :: binary(),
138
@@ -1805,7 +1805,7 @@ update_auth(Host, Node, Type, Nidx, Subs
139
 create_node(Host, ServerHost, Node, Owner, Type) ->
140
     create_node(Host, ServerHost, Node, Owner, Type, all, []).
141
 
142
--spec(create_node/7 ::
143
+-spec(create_node
144
     (
145
 	Host          :: mod_pubsub:host(),
146
 	ServerHost    :: binary(),
147
@@ -1931,7 +1931,7 @@ create_node(Host, ServerHost, Node, Owne
148
 %%<li>The node is the root collection node, which cannot be deleted.</li>
149
 %%<li>The specified node does not exist.</li>
150
 %%</ul>
151
--spec(delete_node/3 ::
152
+-spec(delete_node
153
     (
154
 	Host  :: mod_pubsub:host(),
155
 	Node  :: mod_pubsub:nodeId(),
156
@@ -2015,7 +2015,7 @@ delete_node(Host, Node, Owner) ->
157
 %%<li>The node does not support subscriptions.</li>
158
 %%<li>The node does not exist.</li>
159
 %%</ul>
160
--spec(subscribe_node/5 ::
161
+-spec(subscribe_node
162
     (
163
 	Host          :: mod_pubsub:host(),
164
 	Node          :: mod_pubsub:nodeId(),
165
@@ -2134,7 +2134,7 @@ subscribe_node(Host, Node, From, JID, Co
166
 %%<li>The node does not exist.</li>
167
 %%<li>The request specifies a subscription ID that is not valid or current.</li>
168
 %%</ul>
169
--spec(unsubscribe_node/5 ::
170
+-spec(unsubscribe_node
171
     (
172
 	Host  :: mod_pubsub:host(),
173
 	Node  :: mod_pubsub:nodeId(),
174
@@ -2172,7 +2172,7 @@ unsubscribe_node(Host, Node, From, Subsc
175
 %%<li>The item contains more than one payload element or the namespace of the root payload element does not match the configured namespace for the node.</li>
176
 %%<li>The request does not match the node configuration.</li>
177
 %%</ul>
178
--spec(publish_item/6 ::
179
+-spec(publish_item
180
     (
181
 	Host       :: mod_pubsub:host(),
182
 	ServerHost :: binary(),
183
@@ -2307,7 +2307,7 @@ publish_item(Host, ServerHost, Node, Pub
184
 %%<li>The node does not support persistent items.</li>
185
 %%<li>The service does not support the deletion of items.</li>
186
 %%</ul>
187
--spec(delete_item/4 ::
188
+-spec(delete_item
189
     (
190
 	Host      :: mod_pubsub:host(),
191
 	Node      :: mod_pubsub:nodeId(),
192
@@ -2371,7 +2371,7 @@ delete_item(Host, Node, Publisher, ItemI
193
 %%<li>The node is not configured to persist items.</li>
194
 %%<li>The specified node does not exist.</li>
195
 %%</ul>
196
--spec(purge_node/3 ::
197
+-spec(purge_node
198
     (
199
 	Host  :: mod_pubsub:host(),
200
 	Node  :: mod_pubsub:nodeId(),
201
@@ -2423,7 +2423,7 @@ purge_node(Host, Node, Owner) ->
202
 %% <p>The permission are not checked in this function.</p>
203
 %% @todo We probably need to check that the user doing the query has the right
204
 %% to read the items.
205
--spec(get_items/7 ::
206
+-spec(get_items
207
     (
208
 	Host      :: mod_pubsub:host(),
209
 	Node      :: mod_pubsub:nodeId(),
210
@@ -2598,7 +2598,7 @@ dispatch_items(From, To, _Node, Stanza) 
211
     ejabberd_router:route(service_jid(From), jid:make(To), Stanza).
212
 
213
 %% @doc <p>Return the list of affiliations as an XMPP response.</p>
214
--spec(get_affiliations/4 ::
215
+-spec(get_affiliations
216
     (
217
 	Host    :: mod_pubsub:host(),
218
 	Node    :: mod_pubsub:nodeId(),
219
@@ -2651,7 +2651,7 @@ get_affiliations(Host, Node, JID, Plugin
220
 	    Error
221
     end.
222
 
223
--spec(get_affiliations/3 ::
224
+-spec(get_affiliations
225
     (
226
 	Host :: mod_pubsub:host(),
227
 	Node :: mod_pubsub:nodeId(),
228
@@ -2696,7 +2696,7 @@ get_affiliations(Host, Node, JID) ->
229
 	    Error
230
     end.
231
 
232
--spec(set_affiliations/4 ::
233
+-spec(set_affiliations
234
     (
235
 	Host        :: mod_pubsub:host(),
236
 	Node        :: mod_pubsub:nodeId(),
237
@@ -3101,7 +3101,7 @@ set_subscriptions(Host, Node, From, Enti
238
 	    end
239
     end.
240
 
241
--spec(get_presence_and_roster_permissions/5 ::
242
+-spec(get_presence_and_roster_permissions
243
     (
244
 	Host          :: mod_pubsub:host(),
245
 	From          :: ljid(),
246
@@ -3167,7 +3167,7 @@ subscription_to_string(pending) -> <<"pe
247
 subscription_to_string(unconfigured) -> <<"unconfigured">>;
248
 subscription_to_string(_) -> <<"none">>.
249
 
250
--spec(service_jid/1 ::
251
+-spec(service_jid
252
     (
253
 	Host :: mod_pubsub:host())
254
     -> jid()
255
@@ -3207,7 +3207,7 @@ sub_option_can_deliver(_, _, {deliver, f
256
 sub_option_can_deliver(_, _, {expire, When}) -> p1_time_compat:timestamp() < When;
257
 sub_option_can_deliver(_, _, _) -> true.
258
 
259
--spec(presence_can_deliver/2 ::
260
+-spec(presence_can_deliver
261
     (
262
 	Entity :: ljid(),
263
 	_      :: boolean())
264
@@ -3233,7 +3233,7 @@ presence_can_deliver({User, Server, Reso
265
 		false, Ss)
266
     end.
267
 
268
--spec(state_can_deliver/2 ::
269
+-spec(state_can_deliver
270
     (
271
 	Entity::ljid(),
272
 	SubOptions :: mod_pubsub:subOptions() | [])
273
@@ -3258,7 +3258,7 @@ state_can_deliver({U, S, R}, SubOptions)
274
 		[], Resources)
275
     end.
276
 
277
--spec(get_resource_state/3 ::
278
+-spec(get_resource_state
279
     (
280
 	Entity     :: ljid(),
281
 	ShowValues :: [binary()],
282
@@ -3283,7 +3283,7 @@ get_resource_state({U, S, R}, ShowValues
283
 	    end
284
     end.
285
 
286
--spec(payload_xmlelements/1 ::
287
+-spec(payload_xmlelements
288
     (
289
 	Payload :: mod_pubsub:payload())
290
     -> Count :: non_neg_integer()
291
@@ -4029,7 +4029,7 @@ unset_cached_item(Host, Nidx) ->
292
 	_ -> ok
293
     end.
294
 
295
--spec(get_cached_item/2 ::
296
+-spec(get_cached_item
297
     (
298
 	Host    :: mod_pubsub:host(),
299
 	Nidx :: mod_pubsub:nodeIdx())
300
@@ -4329,7 +4329,7 @@ string_to_ljid(JID) ->
301
 	    end
302
     end.
303
 
304
--spec(uniqid/0 :: () -> mod_pubsub:itemId()).
305
+-spec(uniqid () -> mod_pubsub:itemId()).
306
 uniqid() ->
307
     {T1, T2, T3} = p1_time_compat:timestamp(),
308
     iolist_to_binary(io_lib:fwrite("~.16B~.16B~.16B", [T1, T2, T3])).
309
@@ -4344,7 +4344,7 @@ itemsEls(Items) ->
310
     [#xmlel{name = <<"item">>, attrs = itemAttr(ItemId), children = Payload}
311
 	|| #pubsub_item{itemid = {ItemId, _}, payload = Payload} <- Items].
312
 
313
--spec(add_message_type/2 ::
314
+-spec(add_message_type
315
     (
316
 	Message :: xmlel(),
317
 	Type    :: atom())
(-)files/patch-node__flat__sql.erl (+98 lines)
Line 0 Link Here
1
--- src/node_flat_sql.erl.orig	2016-09-07 00:41:00 UTC
2
+++ src/node_flat_sql.erl
3
@@ -382,7 +382,7 @@ get_entity_subscriptions(Host, Owner) ->
4
     end,
5
     {result, Reply}.
6
 
7
--spec(get_entity_subscriptions_for_send_last/2 ::
8
+-spec(get_entity_subscriptions_for_send_last
9
     (
10
 	Host :: mod_pubsub:hostPubsub(),
11
 	Owner :: jid())
12
@@ -583,7 +583,7 @@ get_state(Nidx, JID) ->
13
     {SJID, _} = State#pubsub_state.stateid,
14
     State#pubsub_state{items = itemids(Nidx, SJID)}.
15
 
16
--spec(get_state_without_itemids/2 ::
17
+-spec(get_state_without_itemids
18
     (Nidx :: mod_pubsub:nodeIdx(),
19
 	Key :: ljid()) ->
20
     mod_pubsub:pubsubState()
21
@@ -964,14 +964,14 @@ update_subscription(Nidx, JID, Subscript
22
 			"values('">>, Nidx, <<"', '">>, J, <<"', 'n', '">>, S, <<"');">>])
23
     end.
24
 
25
--spec(decode_jid/1 ::
26
+-spec(decode_jid
27
     (   SJID :: binary())
28
     -> ljid()
29
     ).
30
 decode_jid(SJID) ->
31
     jid:tolower(jid:from_string(SJID)).
32
 
33
--spec(decode_affiliation/1 ::
34
+-spec(decode_affiliation
35
     (   Arg :: binary())
36
     -> atom()
37
     ).
38
@@ -982,7 +982,7 @@ decode_affiliation(<<"m">>) -> member;
39
 decode_affiliation(<<"c">>) -> outcast;
40
 decode_affiliation(_) -> none.
41
 
42
--spec(decode_subscription/1 ::
43
+-spec(decode_subscription
44
     (   Arg :: binary())
45
     -> atom()
46
     ).
47
@@ -991,7 +991,7 @@ decode_subscription(<<"p">>) -> pending;
48
 decode_subscription(<<"u">>) -> unconfigured;
49
 decode_subscription(_) -> none.
50
 
51
--spec(decode_subscriptions/1 ::
52
+-spec(decode_subscriptions
53
     (   Subscriptions :: binary())
54
     -> [] | [{atom(), binary()},...]
55
     ).
56
@@ -1004,21 +1004,21 @@ decode_subscriptions(Subscriptions) ->
57
 	end,
58
 	[], str:tokens(Subscriptions, <<",">>)).
59
 
60
--spec(encode_jid/1 ::
61
+-spec(encode_jid
62
     (   JID :: ljid())
63
     -> binary()
64
     ).
65
 encode_jid(JID) ->
66
     ejabberd_sql:escape(jid:to_string(JID)).
67
 
68
--spec(encode_host/1 ::
69
+-spec(encode_host
70
     (   Host :: host())
71
     -> binary()
72
     ).
73
 encode_host({_U, _S, _R} = LJID) -> encode_jid(LJID);
74
 encode_host(Host) -> ejabberd_sql:escape(Host).
75
 
76
--spec(encode_affiliation/1 ::
77
+-spec(encode_affiliation
78
     (   Arg :: atom())
79
     -> binary()
80
     ).
81
@@ -1029,7 +1029,7 @@ encode_affiliation(member) -> <<"m">>;
82
 encode_affiliation(outcast) -> <<"c">>;
83
 encode_affiliation(_) -> <<"n">>.
84
 
85
--spec(encode_subscription/1 ::
86
+-spec(encode_subscription
87
     (   Arg :: atom())
88
     -> binary()
89
     ).
90
@@ -1038,7 +1038,7 @@ encode_subscription(pending) -> <<"p">>;
91
 encode_subscription(unconfigured) -> <<"u">>;
92
 encode_subscription(_) -> <<"n">>.
93
 
94
--spec(encode_subscriptions/1 ::
95
+-spec(encode_subscriptions
96
     (   Subscriptions :: [] | [{atom(), binary()},...])
97
     -> binary()
98
     ).
(-)files/patch-nodetree__dag.erl (+29 lines)
Line 0 Link Here
1
--- src/nodetree_dag.erl.orig	2016-09-07 00:38:05 UTC
2
+++ src/nodetree_dag.erl
3
@@ -167,7 +167,7 @@ oid(Key, Name) -> {Key, Name}.
4
 
5
 %% Key    = jlib:jid() | host()
6
 %% Node = string()
7
--spec(find_node/2 ::
8
+-spec(find_node
9
     (
10
 	Key :: mod_pubsub:hostPubsub(),
11
 	Node :: mod_pubsub:nodeId())
12
@@ -188,7 +188,7 @@ find_opt(Key, Default, Options) ->
13
 	_ -> Default
14
     end.
15
 
16
--spec(traversal_helper/4 ::
17
+-spec(traversal_helper
18
     (
19
 	Pred    :: fun(),
20
 		    Tr      :: fun(),
21
@@ -220,7 +220,7 @@ remove_config_parent(Node, [{collection,
22
 remove_config_parent(Node, [H | T], Acc) ->
23
     remove_config_parent(Node, T, [H | Acc]).
24
 
25
--spec(validate_parentage/3 ::
26
+-spec(validate_parentage
27
     (
28
 	Key            :: mod_pubsub:hostPubsub(),
29
 	Owners         :: [ljid(),...],
(-)files/patch-pubsub__subscription.erl (+56 lines)
Line 0 Link Here
1
--- src/pubsub_subscription.erl.orig	2016-09-07 00:29:55 UTC
2
+++ src/pubsub_subscription.erl
3
@@ -152,7 +152,7 @@ create_table() ->
4
 	Other -> Other
5
     end.
6
 
7
--spec(add_subscription/3 ::
8
+-spec(add_subscription
9
     (
10
 	_JID    :: ljid(),
11
 	_NodeId :: mod_pubsub:nodeIdx(),
12
@@ -166,7 +166,7 @@ add_subscription(_JID, _NodeId, Options)
13
     mnesia:write(#pubsub_subscription{subid = SubID, options = Options}),
14
     SubID.
15
 
16
--spec(delete_subscription/3 ::
17
+-spec(delete_subscription
18
     (
19
 	_JID    :: _,
20
 	_NodeId :: _,
21
@@ -177,7 +177,7 @@ add_subscription(_JID, _NodeId, Options)
22
 delete_subscription(_JID, _NodeId, SubID) ->
23
     mnesia:delete({pubsub_subscription, SubID}).
24
 
25
--spec(read_subscription/3 ::
26
+-spec(read_subscription
27
     (
28
 	_JID    :: ljid(),
29
 	_NodeId :: _,
30
@@ -192,7 +192,7 @@ read_subscription(_JID, _NodeId, SubID) 
31
 	_ -> {error, notfound}
32
     end.
33
 
34
--spec(write_subscription/4 ::
35
+-spec(write_subscription
36
     (
37
 	_JID    :: ljid(),
38
 	_NodeId :: _,
39
@@ -204,7 +204,7 @@ read_subscription(_JID, _NodeId, SubID) 
40
 write_subscription(_JID, _NodeId, SubID, Options) ->
41
     mnesia:write(#pubsub_subscription{subid = SubID, options = Options}).
42
 
43
--spec(make_subid/0 :: () -> SubId::mod_pubsub:subId()).
44
+-spec(make_subid () -> SubId::mod_pubsub:subId()).
45
 make_subid() ->
46
     {T1, T2, T3} = p1_time_compat:timestamp(),
47
     iolist_to_binary(io_lib:fwrite("~.16B~.16B~.16B", [T1, T2, T3])).
48
@@ -272,7 +272,7 @@ xopt_to_bool(Option, _) ->
49
     ErrTxt = iolist_to_binary(io_lib:format(Txt, [Option])),
50
     {error, ?ERRT_NOT_ACCEPTABLE(?MYLANG, ErrTxt)}.
51
 
52
--spec(get_option_xfield/3 ::
53
+-spec(get_option_xfield
54
     (
55
 	Lang :: binary(),
56
 	Key  :: atom(),
(-)files/patch-pubsub__subscription__sql.erl (+47 lines)
Line 0 Link Here
1
--- src/pubsub_subscription_sql.erl.orig	2016-09-07 00:26:07 UTC
2
+++ src/pubsub_subscription_sql.erl
3
@@ -73,7 +73,7 @@
4
 
5
 init() -> ok = create_table().
6
 
7
--spec(subscribe_node/3 ::
8
+-spec(subscribe_node
9
     (
10
 	_JID    :: _,
11
 	_NodeId :: _,
12
@@ -85,7 +85,7 @@ subscribe_node(_JID, _NodeId, Options) -
13
     (?DB_MOD):add_subscription(#pubsub_subscription{subid = SubID, options = Options}),
14
     {result, SubID}.
15
 
16
--spec(unsubscribe_node/3 ::
17
+-spec(unsubscribe_node
18
     (
19
 	_JID :: _,
20
 	_NodeId :: _,
21
@@ -99,7 +99,7 @@ unsubscribe_node(_JID, _NodeId, SubID) -
22
 	notfound -> {error, notfound}
23
     end.
24
 
25
--spec(get_subscription/3 ::
26
+-spec(get_subscription
27
     (
28
 	_JID    :: _,
29
 	_NodeId :: _,
30
@@ -113,7 +113,7 @@ get_subscription(_JID, _NodeId, SubID) -
31
 	notfound -> {error, notfound}
32
     end.
33
 
34
--spec(set_subscription/4 ::
35
+-spec(set_subscription
36
     (
37
 	_JID    :: _,
38
 	_NodeId :: _,
39
@@ -167,7 +167,7 @@ parse_options_xform(XFields) ->
40
 %%====================================================================
41
 create_table() -> ok.
42
 
43
--spec(make_subid/0 :: () -> mod_pubsub:subId()).
44
+-spec(make_subid () -> mod_pubsub:subId()).
45
 make_subid() ->
46
     {T1, T2, T3} = p1_time_compat:timestamp(),
47
     iolist_to_binary(io_lib:fwrite("~.16B~.16B~.16B", [T1, T2, T3])).

Return to bug 212410