#20 WritePidFile and DeletePidFile should use helper function

closed-fixed
Psychon
None
5
2010-04-24
2010-04-23
Reed Loden
No

From http://en.znc.in/wiki/User:Psychon/ToDo, implement #10 -- "WritePidFile and DeletePidFile should use some common code to get the path for the pid file (copy & paste is evil :P) ".

Discussion

  • Reed Loden
    Reed Loden
    2010-04-23

    v1 patch

     
    Attachments
  • Psychon
    Psychon
    2010-04-23

    Uhm, not going to commit this.
    Here's a hint: When you call new, it usually makes sense to call delete later on.

    And another hint: Don't code when tired, I usually write stupid bugs when I do that. ;)

     
  • Psychon
    Psychon
    2010-04-23

    Oh, also it could make sense to make InitPidFile() protected/private since it's not really meant to be used by others. But that's pretty much a matter of taste...

     
  • Reed Loden
    Reed Loden
    2010-04-24

    v2 patch

     
    Attachments
  • Psychon
    Psychon
    2010-04-24

    • assigned_to: nobody --> psychon
    • status: open --> closed-fixed
     
  • Psychon
    Psychon
    2010-04-24

    r1929, thanks.