Skip to content

mod.dronescan: tidGlineQueue is never cancelled on detach, and the timer ids start uninitialised #98

Description

@MrIron-no

Two small things in the same area.

One periodic timer is never cancelled on detach. mod.dronescan/dronescan.cc's OnDetach() cancels tidClearJoinCounter, tidClearNickCounter and tidClearActiveList (1118-1120), tidRepeatGC (1162), tidSecondSpyCheck (1166) and tidSpyJoinRetry (1167) — but never tidGlineQueue. Masked by removeAllTimers() on unregister, so it is an inconsistency rather than a leak today.

The timer ids start uninitialised. None of the seven members at mod.dronescan/dronescan.h:887-904 has an initialiser:

xServer::timerID tidClearActiveList;
xServer::timerID tidClearJoinCounter;
xServer::timerID tidClearNickCounter;
xServer::timerID tidGlineQueue;
xServer::timerID tidRepeatGC;
xServer::timerID tidSecondSpyCheck;
xServer::timerID tidSpyJoinRetry;

This is latent only, because OnAttach() assigns all seven before any of them can fire. It becomes real the moment a cancel path runs before OnAttach() — an early error return, or a new caller added later — since an indeterminate id would then be passed to UnRegisterTimer(). Initialising them to 0 costs nothing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions