Official eMule-Board: Updating Clienlist Twice? - Official eMule-Board

Jump to content


Page 1 of 1

Updating Clienlist Twice?

#1 User is offline   JustusJonas 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 55
  • Joined: 09-November 02

Posted 18 March 2003 - 07:20 PM

we have in DownloadClient.cpp line 326:

  UpdateDisplayedInfo(true);
  theApp.emuledlg->transferwnd.clientlistctrl.RefreshClient(this);


but here look at

void CUpDownClient::UpdateDisplayedInfo(boolean force) {
    DWORD curTick = ::GetTickCount();

    if(force || curTick-m_lastRefreshedDLDisplay > MINWAIT_BEFORE_DLDISPLAY_WINDOWUPDATE+(uint32)(rand()/(RAND_MAX/1000))) {
     theApp.emuledlg->transferwnd.downloadlistctrl.UpdateItem(this);
  theApp.emuledlg->transferwnd.clientlistctrl.RefreshClient(this);
        m_lastRefreshedDLDisplay = curTick;
    }
}


so isn't the clientlist updated twice? :unsure:

This post has been edited by JustusJonas: 18 March 2003 - 07:29 PM

0

#2 User is offline   LoneStar 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1005
  • Joined: 27-September 02

Posted 18 March 2003 - 07:25 PM

Potentially yes, but only if the last time the control was refreshed is longer than the formula given there. Otherwise it's only refreshed once.
-D
0

#3 User is offline   zz 

  • -
  • PipPipPipPipPipPipPip
  • Group: Debugger
  • Posts: 2014
  • Joined: 30-November 02

Posted 18 March 2003 - 07:26 PM

Yes, someone must have forgotten to uncomment the old update call. :) Easy to miss.

/zz B)
ZZUL - get control of your uploads: ZZUL Forum
0

#4 User is offline   JustusJonas 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 55
  • Joined: 09-November 02

Posted 18 March 2003 - 07:30 PM

isn't it a whole mess with these update and refresh functions... sometimes they are directly updated, sometimes only if needed via a checking function..... how about cleaning that up? storing some info when what was updated last and only update if it is needed and only if it is seen... though i haven't looked that much into the code but i can't see any kind of structure behind updating controls...


@LoneStar nope it's forced so it's always updated twice... and i have some severe CPU suage since i upgraded to 27a... (not that this would cause it :huh: )

This post has been edited by JustusJonas: 18 March 2003 - 07:32 PM

0

#5 User is offline   LoneStar 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1005
  • Joined: 27-September 02

Posted 18 March 2003 - 07:47 PM

Oh yeah, missed the force... my bad :)
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users