diff options
author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-06 17:48:40 -0400 |
---|---|---|
committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-06 17:48:40 -0400 |
commit | 6d545e723a7e972998a0e77adcf2219a31a9b800 (patch) | |
tree | 1aa0e2cb470b178669d1abab52c7b8ebac406964 /nexgb/xgbgen/request_reply.go | |
parent | 135cee57610cccd10009b264cce7fbcd5af367cb (diff) | |
download | haven-6d545e723a7e972998a0e77adcf2219a31a9b800.tar.gz haven-6d545e723a7e972998a0e77adcf2219a31a9b800.tar.xz haven-6d545e723a7e972998a0e77adcf2219a31a9b800.zip |
add more extension cruft. make extension checking more uniform.
Diffstat (limited to 'nexgb/xgbgen/request_reply.go')
-rw-r--r-- | nexgb/xgbgen/request_reply.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nexgb/xgbgen/request_reply.go b/nexgb/xgbgen/request_reply.go index 7cd2859..c7a4cf8 100644 --- a/nexgb/xgbgen/request_reply.go +++ b/nexgb/xgbgen/request_reply.go @@ -22,7 +22,7 @@ type Request struct { // It also initializes the reply if one exists, and all fields in this request. func (r *Request) Initialize(p *Protocol) { r.srcName = SrcName(p, r.xmlName) - if p.Name != "xproto" { + if p.isExt() { r.srcName = strings.Title(strings.ToLower(p.Name)) + r.srcName } @@ -93,7 +93,7 @@ func (r *Request) Size(c *Context) Size { // request. In an extension request, this byte is always occupied // by the opcode of the request (while the first byte is always occupied // by the opcode of the extension). - if c.protocol.Name == "xproto" { + if !c.protocol.isExt() { size = size.Add(newFixedSize(3)) } else { size = size.Add(newFixedSize(4)) |