~ubuntu-branches/ubuntu/karmic/erlang/karmic-security

« back to all changes in this revision

Viewing changes to lib/cosTransactions/src/ETraP_Common.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-06-11 12:18:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090611121807-ks7eb4xrt7dsysgx
Tags: 1:13.b.1-dfsg-1
* New upstream release.
* Removed unnecessary dependency of erlang-os-mon on erlang-observer and
  erlang-tools and added missing dependency of erlang-nox on erlang-os-mon
  (closes: #529512).
* Removed a patch to eunit application because the bug was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
%%            'EXIT', 'COMM_FAILURE' or 'OBJECT_NOT_EXIST'
138
138
%%------------------------------------------------------------
139
139
 
140
 
send_stubborn(M, F, A, MaxR, Wait) when list(A) ->
 
140
send_stubborn(M, F, A, MaxR, Wait) when is_list(A) ->
141
141
    send_stubborn(M, F, A, MaxR, Wait, 0);
142
142
send_stubborn(M, F, A, MaxR, Wait) ->
143
143
    send_stubborn(M, F, [A], MaxR, Wait, 0).
147
147
send_stubborn(M, F, A, MaxR, Wait, Times) ->
148
148
    ?debug_print("~p:~p(~p)  # of retries: ~p~n", [M,F,A, Times]),    
149
149
    case catch apply(M,F,A) of
150
 
        {'EXCEPTION', E} when record(E, 'COMM_FAILURE')->
151
 
            NewTimes = Times +1,
152
 
            timer:sleep(Wait),
153
 
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);
154
 
        {'EXCEPTION', E} when record(E, 'TRANSIENT')->
155
 
            NewTimes = Times +1,
156
 
            timer:sleep(Wait),
157
 
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);
158
 
        {'EXCEPTION', E} when record(E, 'TIMEOUT')->
 
150
        {'EXCEPTION', E} when is_record(E, 'COMM_FAILURE')->
 
151
            NewTimes = Times +1,
 
152
            timer:sleep(Wait),
 
153
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);
 
154
        {'EXCEPTION', E} when is_record(E, 'TRANSIENT')->
 
155
            NewTimes = Times +1,
 
156
            timer:sleep(Wait),
 
157
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);
 
158
        {'EXCEPTION', E} when is_record(E, 'TIMEOUT')->
159
159
            NewTimes = Times +1,
160
160
            timer:sleep(Wait),
161
161
            send_stubborn(M, F, A, MaxR, Wait, NewTimes);