Add hostname (%h) and version (%v) templates for the servername parameter

This commit is contained in:
Ron Pedde
2006-10-16 03:52:45 +00:00
parent 2f0dafba61
commit 325c86073b
2 changed files with 71 additions and 6 deletions

View File

@@ -132,6 +132,11 @@ void txt_add(char *txtrecord, char *fmt, ...) {
va_end(ap);
len = (int)strlen(buff);
if(len + strlen(txtrecord) > 255) {
DPRINTF(E_FATAL,L_MAIN,"dns-sd text string too long. Try a shorter "
"share name.\n");
}
end = txtrecord + strlen(txtrecord);
*end = len;
strcpy(end+1,buff);