karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
299 stars 107 forks source link

Fallbacks mountspoints & Auth URL inconsistent #203

Open niko opened 6 years ago

niko commented 6 years ago

When a mountpoint is configured with authentication type="url" (listener_add and listener_remove) and a fallback mountpoint which doesn't have authentication type="url" the behaviour is inconsistent: the listener_add call gets executed, the listener_remove call isn't.

Example: With a configuration like this listener_remove isn't executed (at least not while the fallback is active):

<mount><mount-name>/one</mount-name>
  <fallback-mount>/one.autodj</fallback-mount>
  <fallback-override>1</fallback-override>
  <authentication type="url">
    <option name="listener_add"    value="http://auth.service/add"/>
    <option name="listener_remove" value="http://stats.service/remove"/>
  </authentication>
</mount>
<mount><mount-name>/one.autodj</mount-name>
</mount>

You need to have the same auth configuration for the fallback mountpoint, too to get the expected behaviour.

IMHO this should be documented or fixed. My C foo is too weak for a fix. I can provide a pull request with documentation for this behaviour.