diff options
author | Niclas Eklund <[email protected]> | 2011-03-03 14:50:42 +0100 |
---|---|---|
committer | Niclas Eklund <[email protected]> | 2011-03-03 14:50:42 +0100 |
commit | 8c4ece5c36e153e739f344eccadd01b4c3e7ccce (patch) | |
tree | 7a9b26ea0b84670c6a404f1873cde80dc5c28528 /lib/cosEventDomain/src | |
parent | 45892fd845b74532a6cae750372b6e80eb8e3ad9 (diff) | |
parent | 4414036566181c45f592036a03a3b5898f725d95 (diff) | |
download | otp-8c4ece5c36e153e739f344eccadd01b4c3e7ccce.tar.gz otp-8c4ece5c36e153e739f344eccadd01b4c3e7ccce.tar.bz2 otp-8c4ece5c36e153e739f344eccadd01b4c3e7ccce.zip |
Merge branch 'nick/CORBA/avoid_warnings/OTP-9050' into dev
* nick/CORBA/avoid_warnings/OTP-9050:
Removed code commented out.
More specs removed.
More specs removed.
More specs removed.
Removed more spec:s that wasn't needed.
Removed spec:s that wasn't needed.
Updated light weight tests.
Updsated macro EFORMAT exit handling.
Corrected spec usage.
Eliminated Dialyzer warnings when using exit or throw.
Conflicts:
lib/cosEvent/doc/src/notes.xml
lib/cosEvent/vsn.mk
lib/cosEventDomain/doc/src/notes.xml
lib/cosEventDomain/vsn.mk
lib/cosNotification/vsn.mk
lib/cosProperty/doc/src/notes.xml
lib/cosProperty/vsn.mk
lib/cosTime/doc/src/notes.xml
lib/cosTime/vsn.mk
lib/orber/include/ifr_types.hrl
lib/orber/vsn.mk
Diffstat (limited to 'lib/cosEventDomain/src')
-rw-r--r-- | lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl | 24 | ||||
-rw-r--r-- | lib/cosEventDomain/src/cosEventDomainApp.erl | 13 |
2 files changed, 26 insertions, 11 deletions
diff --git a/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl b/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl index 0b73100540..f5dd6d5c14 100644 --- a/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl +++ b/lib/cosEventDomain/src/CosEventDomainAdmin_EventDomain_impl.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-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 @@ -778,12 +778,17 @@ get_qos(_OE_This, #state{cyclic = Cyclic, diamonds = Diamonds} = State) -> %%---------------------------------------------------------------------- set_qos(_OE_This, State, NewQoS) -> QoS = cosEventDomainApp:get_qos(NewQoS), - set_qos_helper(QoS, State, []). + case set_qos_helper(QoS, State, []) of + {ok, NewState} -> + {reply, ok, NewState}; + {error, Errors} -> + corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors}) + end. set_qos_helper([], State, []) -> - {reply, ok, State}; + {ok, State}; %{reply, ok, State}; set_qos_helper([], _, Errors) -> - corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors}); + {error, Errors}; set_qos_helper([{?DiamondDetection, Diamonds}|T], #state{diamonds = Diamonds} = State, Errors) -> set_qos_helper(T, State, Errors); @@ -828,12 +833,17 @@ set_qos_helper([{?CycleDetection, _}|T], #state{cyclic = Cyclic} = State, Errors %%---------------------------------------------------------------------- validate_qos(_OE_This, State, WantedQoS) -> QoS = cosEventDomainApp:get_qos(WantedQoS), - {reply, {ok, validate_qos_helper(QoS, State, [], [])}, State}. + case validate_qos_helper(QoS, State, [], []) of + {ok, Properties} -> + {reply, {ok, Properties}, State}; + {error, Errors} -> + corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors}) + end. validate_qos_helper([], _, Properties, []) -> - Properties; + {ok, Properties}; validate_qos_helper([], _, _, Errors) -> - corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Errors}); + {error, Errors}; validate_qos_helper([{?DiamondDetection, ?ForbidDiamonds}|T], State, Properties, Errors) -> case get_diamonds_helper(State, false) of diff --git a/lib/cosEventDomain/src/cosEventDomainApp.erl b/lib/cosEventDomain/src/cosEventDomainApp.erl index d57f51443c..734e4deccb 100644 --- a/lib/cosEventDomain/src/cosEventDomainApp.erl +++ b/lib/cosEventDomain/src/cosEventDomainApp.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-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 @@ -270,12 +270,17 @@ create_id() -> get_qos([]) -> []; get_qos(Properties) -> - get_qos(Properties, [], []). + case get_qos(Properties, [], []) of + {ok, Supported} -> + Supported; + {error, Unsupported} -> + corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Unsupported}) + end. get_qos([], Supported, []) -> - Supported; + {ok, Supported}; get_qos([], _, Unsupported) -> - corba:raise(#'CosNotification_UnsupportedQoS'{qos_err = Unsupported}); + {error, Unsupported}; get_qos([#'CosNotification_Property'{name = ?CycleDetection, value= #any{value = ?AuthorizeCycles}}|T], Supported, Unsupported) -> |