Changeset 1020
- Timestamp:
- 04/24/08 10:20:56 (13 years ago)
- Files:
-
- trunk/libffado/src/libieee1394/cycletimer.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libieee1394/cycletimer.h
r1019 r1020 315 315 // check for bogus ctr 316 316 // the cycle timer should be ahead of the receive timer 317 if (diffCycles(cc_cycles, rcv_cycle)<0) { 317 int diff_cycles = diffCycles(cc_cycles, rcv_cycle); 318 if (diff_cycles<0) { 318 319 debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %llu (%d)\n", 319 rcv_cycle, cc_cycles, diff Cycles(cc_cycles, rcv_cycle));320 rcv_cycle, cc_cycles, diff_cycles); 320 321 } 321 322 … … 323 324 // we want cc_seconds to reflect the 'seconds' at the point this 324 325 // was received 325 if (rcv_cycle>cc_cycles ) {326 if (rcv_cycle>cc_cycles && (diff_cycles>=0)) { 326 327 if (cc_seconds) { 327 328 cc_seconds--; … … 407 408 408 409 // check for bogus CTR 409 if (diffCycles(xmt_cycle, cc_cycles)<0) { 410 int diff_cycles = diffCycles(xmt_cycle, cc_cycles); 411 if (diff_cycles<0) { 410 412 debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %llu (%d)\n", 411 xmt_cycle, cc_cycles, diff Cycles(xmt_cycle, cc_cycles));413 xmt_cycle, cc_cycles, diff_cycles); 412 414 } 413 415 … … 415 417 // we want cc_seconds to reflect the 'seconds' at the point this 416 418 // is to be transmitted 417 if (cc_cycles>xmt_cycle ) {419 if (cc_cycles>xmt_cycle && (diff_cycles>=0)) { 418 420 if (cc_seconds) { 419 421 cc_seconds--;