Permalink
Commits on Jul 4, 2012
  1. Roll new release

    Marcus Holland-Moritz committed Jul 4, 2012
  2. Update debhelper dependency

    Marcus Holland-Moritz committed Jul 4, 2012
  3. Fix manpage installation issues

    Marcus Holland-Moritz committed Jul 4, 2012
Commits on Feb 22, 2012
  1. Transfer repository to lastfm organization

    Marcus Holland-Moritz committed Feb 22, 2012
Commits on Feb 21, 2012
  1. Update repo link in manpage

    Marcus Holland-Moritz committed Feb 21, 2012
  2. Improve connect timeout computation

    The connect timeout computation could theoretically overflow. However,
    there was an artificial limit of 60 seconds for connect timeouts. The
    computation has now been changed to not overflow and the restriction
    to 60 seconds has been removed.
    Marcus Holland-Moritz committed Feb 21, 2012
Commits on Feb 14, 2012
  1. Ensure streaming processes can get killed (in a safe way)

    I noticed during testing that after my changes to catch TERM/QUIT/INT
    it was no longer possible to kill the streaming kids of the master
    process. This was obviously bad. However, just removing the signal
    handlers for the streaming process is bad as well as killing such a
    process would cause the connection counters to become invalid.
    
    So this change handles signals in the streaming process in much the
    same way as they're handled in the master and monitoring process and
    attempts to shut the connection down gracefully when catching a signal.
    
    This is still not a perfect solution as inconsistencies can arise when
    the process is killed with a signal that cannot be caught (SIGKILL).
    Marcus Holland-Moritz committed Feb 14, 2012
  2. Protect the monitoring loop from select/signal race condition

    Marcus Holland-Moritz committed Feb 14, 2012
  3. Ensure connection counters are kept consistent if fork() fails

    Marcus Holland-Moritz committed Feb 14, 2012
  4. Make group index loop a little more intuitive to read

    Marcus Holland-Moritz committed Feb 14, 2012
  5. Fix non-volatile variable access from a signal handler

    Marcus Holland-Moritz committed Feb 14, 2012
  6. Refactor setaddress() / getport()

    This change merges setaddress() and setaddress_noexitonerror() into
    one function that will now also do slightly better error checking.
    getport() will also be much stricter now about its arguments.
    Marcus Holland-Moritz committed Feb 14, 2012
Commits on Feb 13, 2012
  1. Wording / whitespace cleanup

    Marcus Holland-Moritz committed Feb 13, 2012
  2. Update changelog

    Marcus Holland-Moritz committed Feb 13, 2012
  3. Update the README file

    Marcus Holland-Moritz committed Feb 13, 2012
  4. Final polishing of the main source file

    - add copyright & version info
    - initialise a variable to get rid of a compiler warning
    Marcus Holland-Moritz committed Feb 13, 2012
  5. Update Makefile

    - enable optimisation
    - generate html/pdf docs
    Marcus Holland-Moritz committed Feb 13, 2012
  6. Update the manpage

    - Nicer formatting so it actually becomes usable
    - Document monitoring support
    - Improve section on interactive control
    - Update copyright/authors section
    Marcus Holland-Moritz committed Feb 13, 2012
  7. Implement monitoring support

    This change implements channel monitoring. In order to try and keep
    as much of the original code as possible, monitoring is implemented
    by forking off a separate monitoring process that communicates with
    the master process using the same means (shared memory) as the shell
    and connection processes.
    
    There is support for both simple TCP connect checking as well as
    arbitrary health check commands that can be run by the monitoring
    process.
    Marcus Holland-Moritz committed Feb 13, 2012
Commits on Feb 11, 2012
  1. Improve shared memory handling

    The original implementation would cause shared memory resource leaks
    when terminating balance. This is now avoided by marking the shared
    memory segment as to-be-removed when the last process detaches. This
    also means that it's easier for the interactive shell to determine
    the presence of the master process.
    
    Furthermore, the code to set up the shared memory segment will now
    handle the case of a stale and incompatible shared memory segment,
    which might be left over from a crashed balance instance.
    mhx committed Feb 11, 2012
  2. Shut down balance more gracefully

    Balance now catches the TERM, INT and QUIT signals and shuts down
    in a more controlled way. Also, the interactive kill commands sends
    a TERM instead of a KILL signal, which is most likely good enough.
    SIGKILL should always be the last resort.
    mhx committed Feb 11, 2012
  3. Use tri-state channel status

    Channels can now be soft- or hard-disabled or enabled. Hard-disabling
    is a manual process and a hard-disabled channel can only be re-enabled
    manually. Soft-disabling can be done automatically by balance if it
    finds a channel to be degraded. Soft-disabled channels can be re-
    enabled by balance if the channel becomes functional again. But this
    feature is yet to be implemented.
    mhx committed Feb 11, 2012
  4. Some more refactoring

    - add patchlevel and group count to shared memory
    - balance -> balance.fm
    mhx committed Feb 11, 2012
Commits on Feb 10, 2012
  1. Refactoring

    - use const pointers where possible
    - try to avoid casting
    - remove unused readline() function
    - fix setaddress_noexitonerror(), which was completely broken
    Marcus Holland-Moritz committed Feb 10, 2012
  2. Remove rcsid string

    Marcus Holland-Moritz committed Feb 10, 2012
  3. Fix some oddities

    - wrong exit codes
    - off-by-one errors when accessing groups/channels
    - return and parameter types
    - <> vs. "" includes
    Marcus Holland-Moritz committed Feb 10, 2012
Commits on Feb 9, 2012
  1. Make functions static where possible

    Marcus Holland-Moritz committed Feb 9, 2012
  2. Whitespace cleanup of manpage

    Marcus Holland-Moritz committed Feb 9, 2012
  3. Update .gitignore

    Marcus Holland-Moritz committed Feb 9, 2012
Commits on Feb 7, 2012
  1. More renaming and cleaning up of defunct revision code

    Marcus Holland-Moritz committed Feb 7, 2012
  2. Whitespace cleanup

    Marcus Holland-Moritz committed Feb 7, 2012
  3. Rename to balance.fm and add debian packaging support

    Marcus Holland-Moritz committed Feb 7, 2012
  4. Fix and refactor logging/reporting code

    The original code was too verbose and contained bugs that could
    write error messages to the sockets of a connected peer.
    Marcus Holland-Moritz committed Feb 7, 2012