summaryrefslogtreecommitdiff
path: root/ext/standard/dns_win32.c
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2010-10-08 23:02:37 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2010-10-08 23:02:37 +0000
commitb1d5cf7348105cb8205b0fe7c54494b1fefd80cf (patch)
tree2340c3e903bee18c13cf3eee80101b460ec0a1fc /ext/standard/dns_win32.c
parentdd5d1b2b66d3ad949609e76127913d46bf7cf573 (diff)
downloadphp-git-b1d5cf7348105cb8205b0fe7c54494b1fefd80cf.tar.gz
- Added numeric record type and raw data for unknown DNS
record types.
Diffstat (limited to 'ext/standard/dns_win32.c')
-rw-r--r--ext/standard/dns_win32.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c
index ac3aab00b1..a86cc06a1e 100644
--- a/ext/standard/dns_win32.c
+++ b/ext/standard/dns_win32.c
@@ -320,7 +320,14 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, zval **s
break;
default:
- break;
+ {
+ char buf[10]; /* max length of short + sizeof(id #) */
+ snprintf(buf, 10, "id #%hu", (unsigned short) type);
+ buf[10-1] = '\0';
+ add_assoc_string(*subarray, "type", buf, 1);
+ add_assoc_stringl(*subarray, "data", (char*) &pRec->Data, (uint) pRec->wDataLength, 1);
+ break;
+ }
}
add_assoc_string(*subarray, "class", "IN", 1);