- REGISTER response generated from siproxd must include
a Contact header.
1. tell gcc that the logging functions use printf style
format strings. This gets gcc to tell us about a lot
of the problems.
2. size_t is not an int on AMD64, so don't treat it
like one. I've changed to use "%ld" format code and
cast to a long, which should work well enough.
3. some format strings didn't match the argument lists.
These fixes are pretty clear.
4. log_debug, log_error, log_warn, log_info could all
end up evaluating their varargs list multiple times if
the message was to be logged to multiple places. This
causes the second/third uses to access invalid memory
and potentially segfault. I fixed this by using
va_copy() to copy the varargs list for each use.