This removes tsdecrypt's error message in favour of getopt
native errors. Our message was always 'Unknown parameter'
which was not correct (most of the time) and very misleading.
This is useful when DNS name is used for server address. Without logging
the actual IP address there was no way to know which server refused the
connection or returned error.
Valgrind report:
Invalid read of size 8
at 0x41CCB7: get_socket.constprop.1 (udp.c:81)
by 0x41CDC7: udp_connect_input (udp.c:102)
by 0x404BDE: main (tsdecrypt.c:978)
Address 0x607a410 is 0 bytes after a block of size 64 alloc'd
at 0x4C2A359: malloc (vg_replace_malloc.c:270)
by 0x594955C: gaih_inet (in /lib64/libc-2.17.so)
by 0x594D18C: getaddrinfo (in /lib64/libc-2.17.so)
by 0x41CB95: get_socket.constprop.1 (udp.c:61)
by 0x41CDC7: udp_connect_input (udp.c:102)
by 0x404BDE: main (tsdecrypt.c:978)
Increase how much seconds to assume the key is valid.
10 seconds is a bit low, there are services that change their key
every 15 seconds. Increase the period in which we assume the key is
valid to 30 seconds.
Before this it was possible for pthread_join to hang waiting for
threads to finish. Also if there was no input data exiting was
delayed by a second.
After this patch the exit is instant even if there is no input data
and if a thread hangs and the main process can't stop it after two
seconds tsdecrypt exits anyway.
Fix regression related to output to other than multicast addresses.
When IPv6 support was introduced in commit 7e88477439 apparantly the
output to addresses that were not multicast was broken. This commit
fixes the regression.
This patch adds two new EMM counters in the regular stats messages.
Now the counters are:
Received - How much EMMs were received from the input.
Skipped - How much EMMs were skipped because of filtering.
Sent - How much EMMs were added to the sending queue.
Processed - How much EMMs were sent to the CAMD server for processing.