26
1
mirror of https://github.com/processone/ejabberd.git synced 2025-01-01 17:53:00 +01:00

* src/mod_irc/iconv.erl: Fix compilation warnings: 3 (EJAB-290)

* src/mod_irc/mod_irc.erl: Likewise
* src/mod_irc/mod_irc_connection.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/stringprep/stringprep.erl: Likewise
* src/web/ejabberd_http.erl: Likewise
* src/web/ejabberd_http_poll.erl: Likewise

SVN Revision: 1047
This commit is contained in:
Badlop 2007-12-07 00:48:11 +00:00
parent b7c0a89a79
commit 95c69b0251
8 changed files with 85 additions and 77 deletions

View File

@ -1,12 +1,20 @@
2007-12-07 Badlop <badlop@process-one.net>
* src/mod_irc/iconv.erl: Fix compilation warnings: 3 (EJAB-290)
* src/mod_irc/mod_irc.erl: Likewise
* src/mod_irc/mod_irc_connection.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/stringprep/stringprep.erl: Likewise
* src/web/ejabberd_http.erl: Likewise
* src/web/ejabberd_http_poll.erl: Likewise
* src/mod_caps.erl: Fix compilation warnings: Part 2 (EJAB-290)
* src/mod_configure.erl:
* src/mod_configure2.erl:
* src/mod_offline_odbc.erl:
* src/mod_shared_roster.erl:
* src/mod_stats.erl:
* src/mod_version.erl:
* src/mod_configure.erl: Likewise
* src/mod_configure2.erl: Likewise
* src/mod_offline_odbc.erl: Likewise
* src/mod_shared_roster.erl: Likewise
* src/mod_stats.erl: Likewise
* src/mod_version.erl: Likewise
* src/cyrsasl.erl: Fix compilation warnings: Part 1 (EJAB-290)
* src/ejabberd_auth_odbc.erl: Likewise

View File

@ -50,15 +50,15 @@ handle_call(_, _, State) ->
handle_cast(_, State) ->
{noreply, State}.
handle_info({'EXIT', Pid, Reason}, Port) ->
handle_info({'EXIT', _Pid, _Reason}, Port) ->
{noreply, Port};
handle_info({'EXIT', Port, Reason}, Port) ->
{stop, {port_died, Reason}, Port};
%% TODO: Check this clause, because it never matches:
%%handle_info({'EXIT', Port, Reason}, Port) ->
%% {stop, {port_died, Reason}, Port};
handle_info(_, State) ->
{noreply, State}.
code_change(OldVsn, State, Extra) ->
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
terminate(_Reason, Port) ->

View File

@ -185,14 +185,14 @@ do_route(Host, ServerHost, Access, From, To, Packet, DefEnc) ->
do_route1(Host, ServerHost, From, To, Packet, DefEnc) ->
#jid{user = ChanServ, resource = Resource} = To,
{xmlelement, _Name, Attrs, _Els} = Packet,
{xmlelement, _Name, _Attrs, _Els} = Packet,
case ChanServ of
"" ->
case Resource of
"" ->
case jlib:iq_query_info(Packet) of
#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
sub_el = SubEl, lang = Lang} = IQ ->
sub_el = _SubEl, lang = Lang} = IQ ->
Res = IQ#iq{type = result,
sub_el = [{xmlelement, "query",
[{"xmlns", XMLNS}],
@ -220,7 +220,7 @@ do_route1(Host, ServerHost, From, To, Packet, DefEnc) ->
ejabberd_router:route(To,
From,
jlib:iq_to_xml(Res));
#iq{} = IQ ->
#iq{} = _IQ ->
Err = jlib:make_error_reply(
Packet, ?ERR_FEATURE_NOT_IMPLEMENTED),
ejabberd_router:route(To, From, Err);
@ -338,7 +338,7 @@ find_xdata_el1([{xmlelement, Name, Attrs, SubEls} | Els]) ->
find_xdata_el1([_ | Els]) ->
find_xdata_el1(Els).
process_irc_register(Host, From, To, DefEnc,
process_irc_register(Host, From, _To, DefEnc,
#iq{type = Type, xmlns = XMLNS,
lang = Lang, sub_el = SubEl} = IQ) ->
case Type of
@ -347,7 +347,7 @@ process_irc_register(Host, From, To, DefEnc,
case XDataEl of
false ->
IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ACCEPTABLE]};
{xmlelement, _Name, Attrs, SubEls} ->
{xmlelement, _Name, Attrs, _SubEls} ->
case xml:get_attr_s("type", Attrs) of
"cancel" ->
IQ#iq{type = result,
@ -405,7 +405,7 @@ get_form(Host, From, [], Lang, DefEnc) ->
US = {LUser, LServer},
Customs =
case catch mnesia:dirty_read({irc_custom, {US, Host}}) of
{'EXIT', Reason} ->
{'EXIT', _Reason} ->
{error, ?ERR_INTERNAL_SERVER_ERROR};
[] ->
{User, []};
@ -478,13 +478,13 @@ get_form(Host, From, [], Lang, DefEnc) ->
]}]}
end;
get_form(_Host, _, _, Lang, _) ->
get_form(_Host, _, _, _Lang, _) ->
{error, ?ERR_SERVICE_UNAVAILABLE}.
set_form(Host, From, [], Lang, XData) ->
set_form(Host, From, [], _Lang, XData) ->
{LUser, LServer, _} = jlib:jid_tolower(From),
US = {LUser, LServer},
case {lists:keysearch("username", 1, XData),
@ -524,16 +524,16 @@ set_form(Host, From, [], Lang, XData) ->
end;
set_form(_Host, _, _, Lang, XData) ->
set_form(_Host, _, _, _Lang, _XData) ->
{error, ?ERR_SERVICE_UNAVAILABLE}.
get_user_and_encoding(Host, From, IRCServer, DefEnc) ->
#jid{user = User, server = Server,
#jid{user = User, server = _Server,
luser = LUser, lserver = LServer} = From,
US = {LUser, LServer},
case catch mnesia:dirty_read({irc_custom, {US, Host}}) of
{'EXIT', Reason} ->
{'EXIT', _Reason} ->
{User, DefEnc};
[] ->
{User, DefEnc};

View File

@ -179,7 +179,7 @@ code_change(_OldVsn, StateName, StateData, _Extra) ->
%% {stop, Reason, NewStateData}
%%----------------------------------------------------------------------
handle_info({route_chan, Channel, Resource,
{xmlelement, "presence", Attrs, Els}},
{xmlelement, "presence", Attrs, _Els}},
StateName, StateData) ->
NewStateData =
case xml:get_attr_s("type", Attrs) of
@ -225,7 +225,7 @@ handle_info({route_chan, Channel, Resource,
end;
handle_info({route_chan, Channel, Resource,
{xmlelement, "message", Attrs, Els} = El},
{xmlelement, "message", Attrs, _Els} = El},
StateName, StateData) ->
NewStateData =
case xml:get_attr_s("type", Attrs) of
@ -347,7 +347,7 @@ handle_info({route_chan, Channel, Resource,
handle_info({route_chan, Channel, Resource,
{xmlelement, "iq", Attrs, Els} = El},
{xmlelement, "iq", _Attrs, _Els} = El},
StateName, StateData) ->
From = StateData#state.user,
To = jlib:make_jid(lists:concat([Channel, "%", StateData#state.server]),
@ -385,12 +385,12 @@ handle_info({route_chan, Channel, Resource,
end,
{next_state, StateName, StateData};
handle_info({route_chan, Channel, Resource, Packet}, StateName, StateData) ->
handle_info({route_chan, _Channel, _Resource, _Packet}, StateName, StateData) ->
{next_state, StateName, StateData};
handle_info({route_nick, Nick,
{xmlelement, "message", Attrs, Els} = El},
{xmlelement, "message", Attrs, _Els} = El},
StateName, StateData) ->
NewStateData =
case xml:get_attr_s("type", Attrs) of
@ -445,7 +445,7 @@ handle_info({route_nick, Nick,
{next_state, StateName, NewStateData}
end;
handle_info({route_nick, Nick, Packet}, StateName, StateData) ->
handle_info({route_nick, _Nick, _Packet}, StateName, StateData) ->
{next_state, StateName, StateData};
@ -453,16 +453,16 @@ handle_info({ircstring, [$P, $I, $N, $G, $ | ID]}, StateName, StateData) ->
send_text(StateData, "PONG " ++ ID ++ "\r\n"),
{next_state, StateName, StateData};
handle_info({ircstring, [$: | String]}, StateName, StateData) ->
handle_info({ircstring, [$: | String]}, _StateName, StateData) ->
Words = string:tokens(String, " "),
NewStateData =
case Words of
[_, "353" | Items] ->
process_channel_list(StateData, Items);
[_, "332", Nick, [$# | Chan] | _] ->
[_, "332", _Nick, [$# | Chan] | _] ->
process_channel_topic(StateData, Chan, String),
StateData;
[_, "333", Nick, [$# | Chan] | _] ->
[_, "333", _Nick, [$# | Chan] | _] ->
process_channel_topic_who(StateData, Chan, String),
StateData;
[_, "318", _, Nick | _] ->
@ -545,16 +545,16 @@ handle_info({ircstring, String}, StateName, StateData) ->
handle_info({send_text, Text}, StateName, StateData) ->
send_text(StateData, Text),
{next_state, StateName, StateData};
handle_info({tcp, Socket, Data}, StateName, StateData) ->
handle_info({tcp, _Socket, Data}, StateName, StateData) ->
Buf = StateData#state.inbuf ++ binary_to_list(Data),
{ok, Strings} = regexp:split([C || C <- Buf, C /= $\r], "\n"),
?DEBUG("strings=~p~n", [Strings]),
NewBuf = process_lines(StateData#state.encoding, Strings),
{next_state, StateName, StateData#state{inbuf = NewBuf}};
handle_info({tcp_closed, Socket}, StateName, StateData) ->
handle_info({tcp_closed, _Socket}, StateName, StateData) ->
gen_fsm:send_event(self(), closed),
{next_state, StateName, StateData};
handle_info({tcp_error, Socket, Reason}, StateName, StateData) ->
handle_info({tcp_error, _Socket, _Reason}, StateName, StateData) ->
gen_fsm:send_event(self(), closed),
{next_state, StateName, StateData}.
@ -563,7 +563,7 @@ handle_info({tcp_error, Socket, Reason}, StateName, StateData) ->
%% Purpose: Shutdown the fsm
%% Returns: any
%%----------------------------------------------------------------------
terminate(Reason, StateName, StateData) ->
terminate(_Reason, _StateName, StateData) ->
mod_irc:closed_connection(StateData#state.host,
StateData#state.user,
StateData#state.server),
@ -609,7 +609,7 @@ send_text(#state{socket = Socket, encoding = Encoding}, Text) ->
bounce_messages(Reason) ->
receive
{send_element, El} ->
{xmlelement, Name, Attrs, SubTags} = El,
{xmlelement, _Name, Attrs, _SubTags} = El,
case xml:get_attr_s("type", Attrs) of
"error" ->
ok;
@ -633,7 +633,7 @@ route_nick(Pid, Nick, Packet) ->
Pid ! {route_nick, Nick, Packet}.
process_lines(Encoding, [S]) ->
process_lines(_Encoding, [S]) ->
S;
process_lines(Encoding, [S | Ss]) ->
self() ! {ircstring, iconv:convert(Encoding, "utf-8", S)},
@ -649,7 +649,7 @@ process_channel_list_find_chan(StateData, [[$# | Chan] | Items]) ->
process_channel_list_find_chan(StateData, [_ | Items]) ->
process_channel_list_find_chan(StateData, Items).
process_channel_list_users(StateData, Chan, []) ->
process_channel_list_users(StateData, _Chan, []) ->
StateData;
process_channel_list_users(StateData, Chan, [User | Items]) ->
NewStateData = process_channel_list_user(StateData, Chan, User),
@ -708,7 +708,7 @@ process_channel_topic_who(StateData, Chan, String) ->
Msg1 = case Words of
[_, "333", _, _Chan, Whoset , Timeset] ->
case string:to_integer(Timeset) of
{Unixtimeset, Rest} ->
{Unixtimeset, _Rest} ->
"Topic for #" ++ Chan ++ " set by " ++ Whoset ++
" at " ++ unixtime2string(Unixtimeset);
_->
@ -730,7 +730,7 @@ process_channel_topic_who(StateData, Chan, String) ->
process_endofwhois(StateData, String, Nick) ->
process_endofwhois(StateData, _String, Nick) ->
ejabberd_router:route(
jlib:make_jid(lists:concat([Nick, "!", StateData#state.server]),
StateData#state.host, ""),
@ -813,7 +813,7 @@ process_channotice(StateData, Chan, From, String) ->
process_privmsg(StateData, Nick, From, String) ->
process_privmsg(StateData, _Nick, From, String) ->
[FromUser | _] = string:tokens(From, "!"),
{ok, Msg, _} = regexp:sub(String, ".*PRIVMSG[^:]*:", ""),
Msg1 = case Msg of
@ -831,7 +831,7 @@ process_privmsg(StateData, Nick, From, String) ->
[{xmlelement, "body", [], [{xmlcdata, Msg2}]}]}).
process_notice(StateData, Nick, From, String) ->
process_notice(StateData, _Nick, From, String) ->
[FromUser | _] = string:tokens(From, "!"),
{ok, Msg, _} = regexp:sub(String, ".*NOTICE[^:]*:", ""),
Msg1 = case Msg of
@ -849,7 +849,7 @@ process_notice(StateData, Nick, From, String) ->
[{xmlelement, "body", [], [{xmlcdata, Msg2}]}]}).
process_version(StateData, Nick, From) ->
process_version(StateData, _Nick, From) ->
[FromUser | _] = string:tokens(From, "!"),
send_text(
StateData,
@ -863,7 +863,7 @@ process_version(StateData, Nick, From) ->
[FromUser])).
process_userinfo(StateData, Nick, From) ->
process_userinfo(StateData, _Nick, From) ->
[FromUser | _] = string:tokens(From, "!"),
send_text(
StateData,
@ -921,7 +921,7 @@ process_quit(StateData, From, String) ->
{ok, Msg, _} = regexp:sub(String, ".*QUIT[^:]*:", ""),
Msg1 = filter_message(Msg),
NewChans =
%%NewChans =
dict:map(
fun(Chan, Ps) ->
case ?SETS:is_member(FromUser, Ps) of
@ -948,7 +948,7 @@ process_quit(StateData, From, String) ->
StateData.
process_join(StateData, Channel, From, String) ->
process_join(StateData, Channel, From, _String) ->
[FromUser | FromIdent] = string:tokens(From, "!"),
Chan = lists:subtract(Channel, ":#"),
ejabberd_router:route(
@ -976,7 +976,7 @@ process_join(StateData, Channel, From, String) ->
process_mode_o(StateData, Chan, From, Nick, Affiliation, Role) ->
process_mode_o(StateData, Chan, _From, Nick, Affiliation, Role) ->
%Msg = lists:last(string:tokens(String, ":")),
ejabberd_router:route(
jlib:make_jid(lists:concat([Chan, "%", StateData#state.server]),
@ -1118,15 +1118,15 @@ process_iq_admin(StateData, Channel, set, SubEl) ->
Reason = xml:get_path_s(ItemEl, [{elem, "reason"}, cdata]),
process_admin(StateData, Channel, Nick, Affiliation, Role, Reason)
end;
process_iq_admin(StateData, Channel, get, SubEl) ->
process_iq_admin(_StateData, _Channel, get, _SubEl) ->
{error, ?ERR_FEATURE_NOT_IMPLEMENTED}.
process_admin(StateData, Channel, "", Affiliation, Role, Reason) ->
process_admin(_StateData, _Channel, "", _Affiliation, _Role, _Reason) ->
{error, ?ERR_FEATURE_NOT_IMPLEMENTED};
process_admin(StateData, Channel, Nick, Affiliation, "none", Reason) ->
process_admin(StateData, Channel, Nick, _Affiliation, "none", Reason) ->
case Reason of
"" ->
send_text(StateData,
@ -1141,7 +1141,7 @@ process_admin(StateData, Channel, Nick, Affiliation, "none", Reason) ->
process_admin(StateData, Channel, Nick, Affiliation, Role, Reason) ->
process_admin(_StateData, _Channel, _Nick, _Affiliation, _Role, _Reason) ->
{error, ?ERR_FEATURE_NOT_IMPLEMENTED}.

View File

@ -722,7 +722,7 @@ node_disco_identity(Host, Node, From) ->
node_disco_info(Host, Node, From, true, false).
node_disco_features(Host, Node, From) ->
node_disco_info(Host, Node, From, false, true).
node_disco_info(Host, Node, From, Identity, Features) ->
node_disco_info(Host, Node, _From, Identity, Features) ->
Action =
fun(#pubsub_node{type = Type}) ->
I = case Identity of
@ -868,7 +868,7 @@ iq_pubsub(Host, ServerHost, From, IQType, SubEl, Lang) ->
end,
iq_pubsub(Host, ServerHost, From, IQType, SubEl, Lang, all, Plugins).
iq_pubsub(Host, ServerHost, From, IQType, SubEl, Lang, Access, Plugins) ->
iq_pubsub(Host, ServerHost, From, IQType, SubEl, _Lang, Access, Plugins) ->
{xmlelement, _, _, SubEls} = SubEl,
WithoutCdata = xml:remove_cdata(SubEls),
Configuration = lists:filter(fun({xmlelement, Name, _, _}) ->
@ -1083,7 +1083,7 @@ handle_authorization_response(Host, From, To, Packet, XFields) ->
_ -> false
end,
Action = fun(#pubsub_node{type = Type,
options = Options,
%%options = Options,
owners = Owners}) ->
IsApprover = lists:member(jlib:jid_tolower(jlib:jid_remove_resource(From)), Owners),
Subscription = node_call(Type, get_subscription, [Host, Node, Subscriber]),
@ -2052,7 +2052,7 @@ string_to_node(SNode) ->
%%%%%% broadcast functions
broadcast_publish_item(Host, Node, ItemId, From, Payload) ->
broadcast_publish_item(Host, Node, ItemId, _From, Payload) ->
Action =
fun(#pubsub_node{options = Options, type = Type}) ->
case node_call(Type, get_states, [Host, Node]) of
@ -2306,7 +2306,7 @@ broadcast_config_notification(Host, Node, Lang) ->
%% broadcast Stanza to all contacts of the user that are advertising
%% interest in this kind of Node.
broadcast_by_caps({LUser, LServer, LResource}, Node, Type, Stanza) ->
broadcast_by_caps({LUser, LServer, LResource}, Node, _Type, Stanza) ->
?DEBUG("looking for pid of ~p@~p/~p", [LUser, LServer, LResource]),
%% We need to know the resource, so we can ask for presence data.
SenderResources = ejabberd_sm:get_user_resources(LUser, LServer),
@ -2329,7 +2329,7 @@ broadcast_by_caps({LUser, LServer, LResource}, Node, Type, Stanza) ->
%% Also, add "replyto" if entity has presence subscription to the account owner
%% See XEP-0163 1.1 section 4.3.1
Sender = jlib:make_jid(LUser, LServer, ""),
ReplyTo = jlib:make_jid(LUser, LServer, SenderResource), % This has to be used
%%ReplyTo = jlib:make_jid(LUser, LServer, SenderResource), % This has to be used
case catch ejabberd_c2s:get_subscribed_and_online(C2SPid) of
ContactsWithCaps when is_list(ContactsWithCaps) ->
?DEBUG("found contacts with caps: ~p", [ContactsWithCaps]),
@ -2479,7 +2479,7 @@ max_items(Options) ->
atom_to_list(get_option(Options, Var)),
[atom_to_list(O) || O <- Opts])).
get_configure_xfields(Type, Options, Owners, Lang) ->
get_configure_xfields(_Type, Options, _Owners, Lang) ->
[?XFIELD("hidden", "", "FORM_TYPE", ?NS_PUBSUB_NODE_CONFIG),
?BOOL_CONFIG_FIELD("Deliver payloads with event notifications", deliver_payloads),
?BOOL_CONFIG_FIELD("Deliver event notifications", deliver_notifications),
@ -2695,7 +2695,7 @@ features(Type) ->
{'EXIT', {undef, _}} -> [];
Result -> Result
end.
features(Host, []) ->
features(_Host, []) ->
features(?STDNODE);
features(Host, Node) ->
{result, Features} = node_action(Host, Node, features, []),

View File

@ -57,15 +57,15 @@ handle_call(_, _, State) ->
handle_cast(_, State) ->
{noreply, State}.
handle_info({'EXIT', Pid, Reason}, Port) ->
handle_info({'EXIT', _Pid, _Reason}, Port) ->
{noreply, Port};
handle_info({'EXIT', Port, Reason}, Port) ->
{stop, {port_died, Reason}, Port};
%% TODO: Check if this clase is correct: it never matches:
%%handle_info({'EXIT', Port, Reason}, Port) ->
%% {stop, {port_died, Reason}, Port};
handle_info(_, State) ->
{noreply, State}.
code_change(OldVsn, State, Extra) ->
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
terminate(_Reason, Port) ->

View File

@ -316,7 +316,7 @@ process_request(#state{request_method = 'POST',
case (catch url_decode_q_split(Path)) of
{'EXIT', _} ->
process_request(false);
{NPath, Query} ->
{NPath, _Query} ->
LPath = string:tokens(NPath, "/"),
LQuery = case (catch parse_urlencoded(Data)) of
{'EXIT', _Reason} ->
@ -354,7 +354,7 @@ process_request(State) ->
recv_data(State, Len) ->
recv_data(State, Len, []).
recv_data(State, 0, Acc) ->
recv_data(_State, 0, Acc) ->
binary_to_list(list_to_binary(Acc));
recv_data(State, Len, Acc) ->
case State#state.trail of
@ -614,7 +614,7 @@ code_to_phrase(504) -> "Gateway Timeout";
code_to_phrase(505) -> "HTTP Version Not Supported".
parse_auth(Orig = "Basic " ++ Auth64) ->
parse_auth(_Orig = "Basic " ++ Auth64) ->
case decode_base64(Auth64) of
{error, _Err} ->
undefined;

View File

@ -89,7 +89,7 @@ close({http_poll, FsmRef}) ->
catch gen_fsm:sync_send_all_state_event(FsmRef, close).
process([], #request{data = Data} = Request) ->
process([], #request{data = Data} = _Request) ->
case catch parse_request(Data) of
{ok, ID1, Key, NewKey, Packet} ->
ID = if
@ -210,7 +210,7 @@ handle_event({activate, From}, StateName, StateData) ->
}}
end;
handle_event(Event, StateName, StateData) ->
handle_event(_Event, StateName, StateData) ->
{next_state, StateName, StateData}.
%%----------------------------------------------------------------------
@ -222,17 +222,17 @@ handle_event(Event, StateName, StateData) ->
%% {stop, Reason, NewStateData} |
%% {stop, Reason, Reply, NewStateData}
%%----------------------------------------------------------------------
handle_sync_event({send, Packet}, From, StateName, StateData) ->
handle_sync_event({send, Packet}, _From, StateName, StateData) ->
Output = StateData#state.output ++ [lists:flatten(Packet)],
Reply = ok,
{reply, Reply, StateName, StateData#state{output = Output}};
handle_sync_event(stop, From, StateName, StateData) ->
handle_sync_event(stop, _From, _StateName, StateData) ->
Reply = ok,
{stop, normal, Reply, StateData};
handle_sync_event({http_put, Key, NewKey, Packet},
From, StateName, StateData) ->
_From, StateName, StateData) ->
Allow = case StateData#state.key of
"" ->
true;
@ -271,15 +271,15 @@ handle_sync_event({http_put, Key, NewKey, Packet},
{reply, Reply, StateName, StateData}
end;
handle_sync_event(http_get, From, StateName, StateData) ->
handle_sync_event(http_get, _From, StateName, StateData) ->
Reply = {ok, StateData#state.output},
{reply, Reply, StateName, StateData#state{output = ""}};
handle_sync_event(Event, From, StateName, StateData) ->
handle_sync_event(_Event, _From, StateName, StateData) ->
Reply = ok,
{reply, Reply, StateName, StateData}.
code_change(OldVsn, StateName, StateData, Extra) ->
code_change(_OldVsn, StateName, StateData, _Extra) ->
{ok, StateName, StateData}.
%%----------------------------------------------------------------------
@ -288,7 +288,7 @@ code_change(OldVsn, StateName, StateData, Extra) ->
%% {next_state, NextStateName, NextStateData, Timeout} |
%% {stop, Reason, NewStateData}
%%----------------------------------------------------------------------
handle_info({timeout, Timer, _}, StateName,
handle_info({timeout, Timer, _}, _StateName,
#state{timer = Timer} = StateData) ->
{stop, normal, StateData};
@ -300,7 +300,7 @@ handle_info(_, StateName, StateData) ->
%% Purpose: Shutdown the fsm
%% Returns: any
%%----------------------------------------------------------------------
terminate(Reason, StateName, StateData) ->
terminate(_Reason, _StateName, StateData) ->
mnesia:transaction(
fun() ->
mnesia:delete({http_poll, StateData#state.id})