"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dname.c" between
nsd-4.3.5.tar.gz and nsd-4.3.6.tar.gz

About: NSD is an authoritative only, high performance, simple name server daemon.

dname.c  (nsd-4.3.5):dname.c  (nsd-4.3.6)
skipping to change at line 410 skipping to change at line 410
} }
dst = buf; dst = buf;
src = dname_name(dname); src = dname_name(dname);
for (i = 0; i < labels_to_convert; ++i) { for (i = 0; i < labels_to_convert; ++i) {
size_t len = label_length(src); size_t len = label_length(src);
size_t j; size_t j;
++src; ++src;
for (j = 0; j < len; ++j) { for (j = 0; j < len; ++j) {
uint8_t ch = *src++; uint8_t ch = *src++;
if (isalnum((unsigned char)ch) || ch == '-' || ch == '_') { if (isalnum((unsigned char)ch) || ch == '-' || ch == '_' || ch == '*') {
*dst++ = ch; *dst++ = ch;
} else if (ch == '.' || ch == '\\') { } else if (ch == '.' || ch == '\\') {
*dst++ = '\\'; *dst++ = '\\';
*dst++ = ch; *dst++ = ch;
} else { } else {
snprintf(dst, 5, "\\%03u", (unsigned int)ch); snprintf(dst, 5, "\\%03u", (unsigned int)ch);
dst += 4; dst += 4;
} }
} }
*dst++ = '.'; *dst++ = '.';
skipping to change at line 503 skipping to change at line 503
} }
char* wirelabel2str(const uint8_t* label) char* wirelabel2str(const uint8_t* label)
{ {
static char buf[MAXDOMAINLEN*5+3]; static char buf[MAXDOMAINLEN*5+3];
char* p = buf; char* p = buf;
uint8_t lablen; uint8_t lablen;
lablen = *label++; lablen = *label++;
while(lablen--) { while(lablen--) {
uint8_t ch = *label++; uint8_t ch = *label++;
if (isalnum((unsigned char)ch) || ch == '-' || ch == '_') { if (isalnum((unsigned char)ch) || ch == '-' || ch == '_' || ch == '*') {
*p++ = ch; *p++ = ch;
} else if (ch == '.' || ch == '\\') { } else if (ch == '.' || ch == '\\') {
*p++ = '\\'; *p++ = '\\';
*p++ = ch; *p++ = ch;
} else { } else {
snprintf(p, 5, "\\%03u", (unsigned int)ch); snprintf(p, 5, "\\%03u", (unsigned int)ch);
p += 4; p += 4;
} }
} }
*p++ = 0; *p++ = 0;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)