]> git.tuebingen.mpg.de Git - paraslash.git/commit
udp: integrate resolve hook
authorGerrit Renker <grenker@cscs.ch>
Sun, 13 Jun 2010 09:30:47 +0000 (11:30 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 22 Jun 2010 23:16:43 +0000 (01:16 +0200)
commit3a3a63b6b6a420637ecf89e065947965a7fec685
tree6e5eaa95b5a560766511f95d600f9d5eb8866dac
parentde569025d2a282444293d56d4a1209d70f8b7e33
udp: integrate resolve hook

This integrates the new resolve hook into the UDP sender; exploiting the
invariant that the 'port' of sender_command_data structure is now always set.

It further reuses the new resolve_target() function for the pre-configured
sender targets. This is necessary to unify the syntax (otherwise the
server.conf would have to be limited to IP-addresses only), and allows to
use hostnames in the server configuration file.

The worst case that can here be anticipated is that unresolvable targets are
specified in server.conf. In this case the server hangs for circa 20 seconds
per unresolvable target, and then concludes with error messages such as:

 (8355) init_vss_task: initializing udp sender
 ...
 (8355) udp_add_target: adding to target list (10.0.0.2:8000)
 (8355) makesock: can not resolve UDP address funzt.net#8000: Name or service not known.
 (8355) udp_init_target_list: not adding requested target 'funzt.net'
 (8355) makesock: can not resolve UDP address funzt.also.net#8000: Name or service not known.
 (8355) udp_init_target_list: not adding requested target 'funzt.also.net'
 (8355) udp_send_init: udp sender init complete
udp_send.c