Hi,
I have been working on applications that send out cigi messages for a
while, but it's just recently that I started to look into the source code
of the cigi API, and just today that I looked for and found this website.
OK on to topic. I looked into the function CigiCreateSession() in
cigi_api.c from the cigi api/sdk package. It's version 2.7.1, although the
part I'm concerned seems to be unchanged from version 1.0 that I'm actually
using. There is a BasePtrs, a BufferPtrs, and a ThresholdPtrs for each
buffer created for a session. BasePtrs is the pointer to the start of the
particular buffer, BufferPtrs is the pointer to the current position in the
buffer, and ThresholdPtrs is the end-of-buffer marker for the buffer,
taking into consideration of a one byte space needed for CIGI_OPCODE_NONE
when closing a cigi message. For outgoing messages, BufferPtrs is
initialized as BasePtrs plus the size of the CIGI_IG_CONTROL packet. In the
code, ThresholdPtrs is assigned as (BufferPtrs + bufferszie - 1). Shouldn't
it be (BasePtrs + buffersize - 1) instead? The actual buffer starts at
BasePtrs, not at the initial value of BufferPtrs. If my thinking is flawed,
could somebody in the know explain the logic to me? The issue is bothering
me, and all the more because if this is indeed a bug, it should potentially
lead to crashes but somehow I don't recall experiencing any.
Thanks in advance,
Yefei
Nobody/Anonymous
API (deprecated)
None
Public
|
Date: 2009-11-06 22:24 This is only in the API/SDK.code set. |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2009-11-06 22:25 | gregbasler |
| close_date | - | 2009-11-06 22:25 | gregbasler |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use