diff options
author | Tim Potter <tpot@samba.org> | 2005-10-20 07:06:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:03 -0500 |
commit | 7514f906c2e491dbd807833d6b536081d7665d37 (patch) | |
tree | c88f41993400f74625704556eac66347b577a5cf /source4/pidl/lib | |
parent | 20685ca815336e64fd5f7e0681c443951d9dcbf2 (diff) | |
download | samba-7514f906c2e491dbd807833d6b536081d7665d37.tar.gz samba-7514f906c2e491dbd807833d6b536081d7665d37.tar.bz2 samba-7514f906c2e491dbd807833d6b536081d7665d37.zip |
r11211: Append an error message to COL_INFO if the RPC call returned an error.
(This used to be commit b70dd7a757e7341d90c89dffa7e1c4eab790020a)
Diffstat (limited to 'source4/pidl/lib')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm index be2e48a686..41ccaf54dd 100644 --- a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm @@ -401,6 +401,7 @@ sub Function($$$) pidl_code "$ifname\_dissect\_${fn_name}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; pidl_code "{"; indent; + pidl_code "guint32 status;\n"; foreach (@{$fn->{ELEMENTS}}) { if (grep(/out/,@{$_->{DIRECTION}})) { pidl_code "$dissectornames{$_->{NAME}}"; @@ -411,10 +412,15 @@ sub Function($$$) if (not defined($fn->{RETURN_TYPE})) { } elsif ($fn->{RETURN_TYPE} eq "NTSTATUS") { - pidl_code "offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf\_$ifname\_status, NULL);"; + pidl_code "offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf\_$ifname\_status, &status);\n"; + pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"; + pidl_code "\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Error: %s\", val_to_str(status, NT_errors, \"Unknown NT status 0x%08x\"));\n"; $hf_used{"hf\_$ifname\_status"} = 1; } elsif ($fn->{RETURN_TYPE} eq "WERROR") { - pidl_code "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf\_$ifname\_werror, NULL);"; + pidl_code "offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf\_$ifname\_werror, &status);\n"; + pidl_code "if (status != 0 && check_col(pinfo->cinfo, COL_INFO))"; + pidl_code "\tcol_append_fstr(pinfo->cinfo, COL_INFO, \", Error: %s\", val_to_str(status, DOS_errors, \"Unknown DOS error 0x%08x\"));\n"; + $hf_used{"hf\_$ifname\_werror"} = 1; } else { print "$fn->{FILE}:$fn->{LINE}: error: return type `$fn->{RETURN_TYPE}' not yet supported\n"; |