diff options
Diffstat (limited to 'lib/orber/src')
-rw-r--r-- | lib/orber/src/corba.erl | 4 | ||||
-rw-r--r-- | lib/orber/src/orber.erl | 24 | ||||
-rw-r--r-- | lib/orber/src/orber_socket.erl | 12 |
3 files changed, 15 insertions, 25 deletions
diff --git a/lib/orber/src/corba.erl b/lib/orber/src/corba.erl index f4a17c10e9..ecec768544 100644 --- a/lib/orber/src/corba.erl +++ b/lib/orber/src/corba.erl @@ -621,7 +621,7 @@ get_pid(Objkey) -> %% Description: %%---------------------------------------------------------------------- %% To avoid dialyzer warnings due to the use of exit/throw. --spec(raise/1 :: (_) -> no_return()). +-spec raise(term()) -> no_return(). raise(E) -> throw({'EXCEPTION', E}). @@ -632,7 +632,7 @@ raise(E) -> %% Description: %%---------------------------------------------------------------------- %% To avoid dialyzer warnings due to the use of exit/throw. --spec(raise_with_state/2 :: (_, _) -> no_return()). +-spec raise_with_state(term(), term()) -> no_return(). raise_with_state(E, State) -> throw({reply, {'EXCEPTION', E}, State}). diff --git a/lib/orber/src/orber.erl b/lib/orber/src/orber.erl index f0820811f5..665b3cb383 100644 --- a/lib/orber/src/orber.erl +++ b/lib/orber/src/orber.erl @@ -95,13 +95,7 @@ -define(DEBUG_LEVEL, 5). -define(FORMAT(_F, _A), lists:flatten(io_lib:format(_F, _A))). --define(EFORMAT(_F, _A), do_exit(lists:flatten(io_lib:format(_F, _A)))). - - -%% To avoid dialyzer warnings due to the use of exit/throw. --spec(do_exit/1 :: (_) -> no_return()). -do_exit(Reason) -> - exit(Reason). +-define(EFORMAT(_F, _A), exit(lists:flatten(io_lib:format(_F, _A)))). %%----------------------------------------------------------------- @@ -1033,12 +1027,18 @@ remove_node(Node) when is_atom(Node) -> remove_tables(Tables, Node) -> - remove_tables(Tables, Node, []). + case remove_tables(Tables, Node, []) of + ok -> + ok; + {error, Node, Failed} -> + ?EFORMAT("orber:remove_node(~p) failed. Unable to remove table(s): ~p", + [Node, Failed]) + end. -remove_tables([], _, []) -> ok; +remove_tables([], _, []) -> + ok; remove_tables([], Node, Failed) -> - ?EFORMAT("orber:remove_node(~p) failed. Unable to remove table(s): ~p", - [Node, Failed]); + {error, Node, Failed}; remove_tables([T1|Trest], Node, Failed) -> case mnesia:del_table_copy(T1, Node) of {atomic, ok} -> @@ -1047,8 +1047,6 @@ remove_tables([T1|Trest], Node, Failed) -> remove_tables(Trest, Node, [{T1, Reason}|Failed]) end. - - %%----------------------------------------------------------------- %% Internal interface functions %%----------------------------------------------------------------- diff --git a/lib/orber/src/orber_socket.erl b/lib/orber/src/orber_socket.erl index 84ed193ebb..ec2cf8f42a 100644 --- a/lib/orber/src/orber_socket.erl +++ b/lib/orber/src/orber_socket.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -37,7 +37,7 @@ %%----------------------------------------------------------------- -export([start/0, connect/4, listen/3, listen/4, accept/2, accept/3, write/3, controlling_process/3, close/2, peername/2, sockname/2, - peerdata/2, peercert/2, peercert/3, sockdata/2, setopts/3, + peerdata/2, peercert/2, sockdata/2, setopts/3, clear/2, shutdown/3, post_accept/2, post_accept/3]). %%----------------------------------------------------------------- @@ -366,14 +366,6 @@ peercert(Type, _Socket) -> [?LINE, Type], ?DEBUG_LEVEL), {error, ebadsocket}. -peercert(ssl, Socket, Opts) -> - ssl:peercert(Socket, Opts); -peercert(Type, _Socket, Opts) -> - orber:dbg("[~p] orber_socket:peercert(~p, ~p);~n" - "Only available for SSL sockets.", - [?LINE, Type, Opts], ?DEBUG_LEVEL), - {error, ebadsocket}. - %%----------------------------------------------------------------- %% Get peerdata %% |