svn commit: samba r11973 - in branches/SAMBA_4_0/source/librpc/ndr:
.
metze at samba.org
metze at samba.org
Wed Nov 30 13:10:44 GMT 2005
Author: metze
Date: 2005-11-30 13:10:44 +0000 (Wed, 30 Nov 2005)
New Revision: 11973
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11973
Log:
make it easier to find bugs
metze
Modified:
branches/SAMBA_4_0/source/librpc/ndr/libndr.h
branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-11-30 12:40:26 UTC (rev 11972)
+++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-11-30 13:10:44 UTC (rev 11973)
@@ -166,7 +166,8 @@
NDR_ERR_BUFSIZE,
NDR_ERR_ALLOC,
NDR_ERR_RANGE,
- NDR_ERR_TOKEN
+ NDR_ERR_TOKEN,
+ NDR_ERR_IPV4ADDRESS
};
enum ndr_compression_alg {
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2005-11-30 12:40:26 UTC (rev 11972)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2005-11-30 13:10:44 UTC (rev 11973)
@@ -570,7 +570,11 @@
NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address)
{
uint32_t addr;
- if (!is_ipaddress(address)) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (!is_ipaddress(address)) {
+ return ndr_push_error(ndr, NDR_ERR_IPV4ADDRESS,
+ "Invalid IPv4 address: '%s'",
+ address);
+ }
addr = inet_addr(address);
NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr)));
return NT_STATUS_OK;
More information about the samba-cvs
mailing list