Ethereal-dev: [Ethereal-dev] small patch for idl2eth

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Fri, 03 Aug 2001 09:02:45 -0500
Hi,

I have made a small change to ethereal_gen.py.

Improve Template and Description for Attribute delegation code

_get_xxx_at() should only be called for Reply with NO_EXCEPTION
_set_xxx_at() should only be called for Request


Cheers / Frank..

-- 
EUS/SV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Mobile : +1 214 228 0874      Amateur Radio: VK3FCS/KM5WS   
Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 7.1 (2.4.3-12 kernel).
--- ethereal_gen.py	2001/08/03 13:34:54	1.1
+++ ethereal_gen.py	2001/08/03 13:40:32

@@ -2158,6 +2158,10 @@
     #
     # template for Attribute delegation code
     #
+    # Note: _get_xxx() should only be called for Reply with NO_EXCEPTION
+    # Note: _set_xxx() should only be called for Request
+    #
+    #
 
     template_at_delegate_code_get = """\
 if (!strcmp(operation, get_@sname@_at ) && (header->message_type == Reply) && (header->rep_status == NO_EXCEPTION) ) {
@@ -2167,7 +2171,7 @@
 """
     
     template_at_delegate_code_set = """\
-if (!strcmp(operation, set_@sname@_at )) {
+if (!strcmp(operation, set_@sname@_at ) && (header->message_type == Request) ) {
    decode_set_@sname@_at(tvb, pinfo, tree, offset, header, operation);
    return TRUE;
 }