[Live-devel] DelayQueueEntry NULL

Roberts, Randy Randy.Roberts at flir.com
Fri Jun 25 16:40:58 PDT 2010


Hi Ross,

 

Any ideas why I'd be coming across a NULL delay queue entry?

I've added to code in RED below, and I'm seeing this NULL..which causes
a SegFault without the code...

 

void DelayQueue::synchronize() {

  // First, figure out how much time has elapsed since the last sync:

  EventTime timeNow = TimeNow();

  if (timeNow < fLastSyncTime) {

    // The system clock has apparently gone back in time; reset our sync
time and return:

    fLastSyncTime  = timeNow;

    return;

  }

  DelayInterval timeSinceLastSync = timeNow - fLastSyncTime;

  fLastSyncTime = timeNow;

 

  // Then, adjust the delay queue for any entries whose time is up:

  DelayQueueEntry* curEntry = head();

  while (curEntry && timeSinceLastSync >= curEntry->fDeltaTimeRemaining)
{

    timeSinceLastSync -= curEntry->fDeltaTimeRemaining;

    curEntry->fDeltaTimeRemaining = DELAY_ZERO;

    curEntry = curEntry->fNext;

  }

  if (curEntry)

        curEntry->fDeltaTimeRemaining -= timeSinceLastSync;

  else fprintf(stderr, "%s:: curEntry is NULL!!\n", __FUNCTION__);

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100625/36bca7b5/attachment-0001.html>


More information about the live-devel mailing list