~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/cosNotification/src/CosNotification_Common.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
%%            'EXIT', 'COMM_FAILURE' or 'OBJECT_NOT_EXIST'
221
221
%%------------------------------------------------------------
222
222
 
223
 
send_stubborn(M, F, A, MaxR, Wait) when list(A) ->
 
223
send_stubborn(M, F, A, MaxR, Wait) when is_list(A) ->
224
224
    send_stubborn(M, F, A, MaxR, Wait, 0);
225
225
send_stubborn(M, F, A, MaxR, Wait) ->
226
226
    send_stubborn(M, F, [A], MaxR, Wait, 0).
231
231
send_stubborn(M, F, A, MaxR, Wait, Times) ->
232
232
    ?debug_print("~p:~p(~p)  # of retries: ~p~n", [M,F,A, Times]),    
233
233
    case catch apply(M,F,A) of
234
 
        {'EXCEPTION', E} when record(E, 'COMM_FAILURE')->
 
234
        {'EXCEPTION', E} when is_record(E, 'COMM_FAILURE')->
235
235
            NewTimes = Times +1,
236
236
            timer:sleep(Wait),
237
237
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);
312
312
 
313
313
admin_ok(Req) ->
314
314
    case any:get_value(Req#'CosNotification_Property'.value) of
315
 
        Val when integer(Val), Val >= 0 ->
 
315
        Val when is_integer(Val) andalso Val >= 0 ->
316
316
            {ok, Req};
317
317
        _  ->
318
318
            {unsupported, 
630
630
            ok;
631
631
        {Val, _} when Val >= ?not_MinTimeout, Val =< ?not_MaxTimeout ->
632
632
            {ok, Req, LQS};
633
 
        {Val, _} when integer(Val) ->
 
633
        {Val, _} when is_integer(Val) ->
634
634
            {unsupported, 
635
635
             #'CosNotification_PropertyError'{
636
636
               code = 'BAD_VALUE', 
674
674
            ok;
675
675
        {Val, _, L, H} when Val >= L, Val =< H ->
676
676
            {ok, Req, LQS};
677
 
        {Val, _, L, H} when integer(Val) ->
 
677
        {Val, _, L, H} when is_integer(Val) ->
678
678
            {unsupported, 
679
679
             #'CosNotification_PropertyError'{
680
680
               code = 'BAD_VALUE', 
718
718
            ok;
719
719
        {Val, _, L, H} when Val >= L, Val =< H ->
720
720
            {ok, Req, LQS};
721
 
        {Val, _, L, H} when integer(Val) ->
 
721
        {Val, _, L, H} when is_integer(Val) ->
722
722
            {unsupported, 
723
723
             #'CosNotification_PropertyError'{
724
724
               code = 'BAD_VALUE', 
761
761
            ok;
762
762
        {Val, _} when Val >= ?not_MinBatchSize, Val =< ?not_MaxBatchSize ->
763
763
            {ok, Req, LQS};
764
 
        {Val, _} when integer(Val) ->
 
764
        {Val, _} when is_integer(Val) ->
765
765
            {unsupported, 
766
766
             #'CosNotification_PropertyError'{
767
767
               code = 'BAD_VALUE', 
811
811
            ok;
812
812
        {Val, _} when Val >= ?not_MinPacing, Val =< ?not_MaxPacing ->
813
813
            {ok, Req, LQS};
814
 
        {Val, _} when integer(Val) ->
 
814
        {Val, _} when is_integer(Val) ->
815
815
            {unsupported, 
816
816
             #'CosNotification_PropertyError'{
817
817
               code = 'BAD_VALUE', 
852
852
          ?not_GetMaxEventsPerConsumer(LQS)} of
853
853
        {Val, Val} ->
854
854
            ok;
855
 
        {Val, _} when integer(Val),
856
 
                      Val >= ?not_MinConsumerEvents, 
 
855
        {Val, _} when is_integer(Val) andalso
 
856
                      Val >= ?not_MinConsumerEvents andalso
857
857
                      Val =< ?not_MaxConsumerEvents ->
858
858
            {ok, Req, LQS};
859
 
        {Val, _} when integer(Val) ->
 
859
        {Val, _} when is_integer(Val) ->
860
860
            {unsupported, 
861
861
             #'CosNotification_PropertyError'{
862
862
               code = 'BAD_VALUE',