From fc70e3a89f7a5a8913eac3d89ace578f9d1a7c11 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 6 Mar 2018 10:56:26 +0100 Subject: vppapigen: require reply ID different than caller ID Change-Id: I316dc99881bce6a36904863d3c1c049b4f5cf658 Signed-off-by: Marek Gradzki --- src/tools/vppapigen/vppapigen.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tools/vppapigen') diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index 620b2ef7b71..a1bb0e184df 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -345,6 +345,10 @@ class VPPAPIParser(object): | RPC ID RETURNS ID ';' | RPC ID RETURNS STREAM ID ';' | RPC ID RETURNS ID EVENTS event_list ';' ''' + if p[2] == p[4]: + # Verify that caller and reply differ + self._parse_error('Reply ID ({}) should not be equal to Caller ID'.format(p[2]), + self._token_coord(p, 1)) if len(p) == 8: p[0] = Service(p[2], p[4], p[6]) elif len(p) == 7: -- cgit 1.2.3-korg