Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The last argument of dpiConn_newSubscription must be uint64_t *. #28

Closed
kubo opened this issue Aug 15, 2017 · 2 comments
Closed

The last argument of dpiConn_newSubscription must be uint64_t *. #28

kubo opened this issue Aug 15, 2017 · 2 comments
Labels

Comments

@kubo
Copy link

kubo commented Aug 15, 2017

I found a bug when I made a test code about #27.
dpiConn_newSubscription overwrites additional four bytes after the address passed as the last argument.

Look at https://gist.github.com/kubo/394af98c4c541b2e069467a97f0aaec9#file-subscr-test-c-L51-L55.
If the last argument of dpiConn_newSubscription is uint32_t *, subscrId.next4byte must be 0xdeadbeaf at line 53. However it became 0x00000000.
I guess that the type is uint64_t * so the next four bytes were overwritten with 0x00000000.

@anthony-tuininga
Copy link
Member

Thanks, @kubo. I'll take a look.

anthony-tuininga added a commit that referenced this issue Aug 17, 2017
… There is

no OCI documentation for the registration id attribute and it should not be
exposed.  The parameter is also deprecated and will be removed in version 2.1
of the ODPI-C API.
@anthony-tuininga
Copy link
Member

So you are correct. The last parameter of dpiConn_newSubscription() is supposed to be uint64_t *. I have corrected that, but in consultation with my colleagues this parameter is also deprecated (and NULL can be passed to it now) and will be removed in version 2.1. It is not documented in OCI and was never intended to be used. It was originally introduced by a patch to cx_Oracle back in 2012 provided by someone -- not sure how they figured it out back then since there wasn't any documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants