diff options
author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-02 01:46:30 -0400 |
---|---|---|
committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-02 01:46:30 -0400 |
commit | 39507f86ab0468292c24081a80f41c1799d6b477 (patch) | |
tree | 002668a66ec90c71b3bbd05141b378d0b2218d58 /nexgb/xgbgen/translation.go | |
parent | f48b6fafc6d96527a554876e13fc5a0b548005af (diff) | |
download | haven-39507f86ab0468292c24081a80f41c1799d6b477.tar.gz haven-39507f86ab0468292c24081a80f41c1799d6b477.tar.xz haven-39507f86ab0468292c24081a80f41c1799d6b477.zip |
finally starting on the crescendo: requests and replies.
Diffstat (limited to 'nexgb/xgbgen/translation.go')
-rw-r--r-- | nexgb/xgbgen/translation.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nexgb/xgbgen/translation.go b/nexgb/xgbgen/translation.go index 36daa8b..9c7603b 100644 --- a/nexgb/xgbgen/translation.go +++ b/nexgb/xgbgen/translation.go @@ -210,11 +210,13 @@ func (x *XMLRequest) Translate() *Request { // computation of the 'odd_length' field. However, 'string_len' is not // defined. Therefore, let's forcefully add it as a 'local field'. // (i.e., a parameter in the caller but does not get send over the wire.) - stringLenLocal := &LocalField{&SingleField{ - xmlName: "string_len", - Type: newTranslation("CARD16"), - }} - r.Fields = append(r.Fields, stringLenLocal) + if x.Name == "QueryTextExtents" { + stringLenLocal := &LocalField{&SingleField{ + xmlName: "string_len", + Type: newTranslation("CARD16"), + }} + r.Fields = append(r.Fields, stringLenLocal) + } return r } |