Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vppapigen: do not allow to define message as both request and reply
[vpp.git]
/
src
/
tools
/
vppapigen
/
vppapigen.py
diff --git
a/src/tools/vppapigen/vppapigen.py
b/src/tools/vppapigen/vppapigen.py
index
a1bb0e1
..
57e5e3a
100755
(executable)
--- a/
src/tools/vppapigen/vppapigen.py
+++ b/
src/tools/vppapigen/vppapigen.py
@@
-574,6
+574,7
@@
class VPPAPI(object):
msgs = {d.name: d for d in s['defines']}
svcs = {s.caller: s for s in s['services']}
msgs = {d.name: d for d in s['defines']}
svcs = {s.caller: s for s in s['services']}
+ replies = {s.reply: s for s in s['services']}
seen_services = {}
for service in svcs:
seen_services = {}
for service in svcs:
@@
-584,6
+585,9
@@
class VPPAPI(object):
raise ValueError('Service definition refers to unknown message'
' definition in reply: {}'
.format(svcs[service].reply))
raise ValueError('Service definition refers to unknown message'
' definition in reply: {}'
.format(svcs[service].reply))
+ if service in replies:
+ raise ValueError('Service definition refers to message'
+ ' marked as reply: {}'.format(service))
for event in svcs[service].events:
if event not in msgs:
raise ValueError('Service definition refers to unknown '
for event in svcs[service].events:
if event not in msgs:
raise ValueError('Service definition refers to unknown '