~serge-hallyn/ubuntu/oneiric/ipxe/link-kvm

« back to all changes in this revision

Viewing changes to src/net/retry.c

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2011-07-31 20:57:02 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110731205702-kffmzz6tnmgfw50f
Tags: 1.0.0+git-2.149b50-1
New snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
 * @v timer             Retry timer
149
149
 */
150
150
static void timer_expired ( struct retry_timer *timer ) {
 
151
        struct refcnt *refcnt = timer->refcnt;
151
152
        int fail;
152
153
 
153
154
        /* Stop timer without performing RTT calculations */
169
170
 
170
171
        /* Call expiry callback */
171
172
        timer->expired ( timer, fail );
 
173
        /* If refcnt is NULL, then timer may already have been freed */
172
174
 
173
 
        ref_put ( timer->refcnt );
 
175
        ref_put ( refcnt );
174
176
}
175
177
 
176
178
/**
198
200
}
199
201
 
200
202
/** Retry timer process */
201
 
struct process retry_process __permanent_process = {
202
 
        .list = LIST_HEAD_INIT ( retry_process.list ),
203
 
        .step = retry_step,
204
 
};
 
203
PERMANENT_PROCESS ( retry_process, retry_step );