From 39507f86ab0468292c24081a80f41c1799d6b477 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Wed, 2 May 2012 01:46:30 -0400 Subject: finally starting on the crescendo: requests and replies. --- nexgb/xgbgen/translation.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nexgb/xgbgen/translation.go') 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 } -- cgit v1.2.3