Changeset 1376:b8afaf63f65a in freeDiameter
- Timestamp:
- Jun 20, 2019, 6:33:29 PM (5 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdproto/sessions.c
r1373 r1376 207 207 /* If first session is not expired, we just wait until it happens */ 208 208 if ( TS_IS_INFERIOR( &now, &first->timeout ) ) { 209 CHECK_POSIX_DO2( pthread_cond_timedwait( &exp_cond, &exp_lock, &first->timeout ), 210 ETIMEDOUT, /* ETIMEDOUT is a normal error, continue */, 211 /* on other error, */ break ); 212 213 /* on wakeup, loop */ 214 goto again; 209 int ret; 210 211 ret = pthread_cond_timedwait(&exp_cond, &exp_lock, &first->timeout); 212 switch (ret) { 213 case 0: 214 case ETIMEDOUT: 215 /* on wakeup or time-out, loop */ 216 goto again; 217 case EINVAL: 218 if (clock_gettime(CLOCK_REALTIME, &now) < 0) { 219 break; 220 } 221 if (TS_IS_INFERIOR(&now, &first->timeout)) { 222 TRACE_DEBUG(FULL, "'pthread_cond_timedwait(&exp_cond, &exp_lock, &first->timeout)' : timer expired before loop could start"); 223 goto again; 224 } 225 /* FALLTHROUGH */ 226 default: 227 TRACE_ERROR("ERROR: in 'pthread_cond_timedwait(&exp_cond, &exp_lock, &first->timeout)' :\t%s", strerror(ret)); 228 break; 229 } 215 230 } 216 231
Note: See TracChangeset
for help on using the changeset viewer.