Re: CFSocket client side exc_bad_access
Re: CFSocket client side exc_bad_access
- Subject: Re: CFSocket client side exc_bad_access
- From: Jens Alfke <email@hidden>
- Date: Tue, 18 Mar 2014 11:12:50 -0700
On Mar 18, 2014, at 10:47 AM, Jeremy Thompson < email@hidden> wrote: When the client software calls to send data it does so through a void pointer. Void *passed_req
CFDataRef sf = (CFDataRef) passed_req; int slen = CFDataGetLength(sf);
Once I try and get the length of the passed_req I get a bad access error.
Are you saying that the caller has a CFDataRef already but passes it through a void* parameter, and then the code you showed is just casting that pointer back to a CFDataRef? Then that should work fine. But if the caller is just passing a raw pointer to a data block, you can’t legally cast that to a CFDataRef, because it isn’t one.
If this isn’t what’s going on, then you should post some more code for context.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden