Hi everybody, I'm having the above error request member rv in something not a structure of union
. I've googled it and several answers told me it's when working with a pointer but tries to access it as a struct, where I should be using ->
instead of .
int foo(void * arg, struct message * msg)
{
struct fd_info * info = (struct something *) arg;
struct client * csys = info->c_sys;
int * socks[MAX_CONNECTION];
int rv;
socks = &(info->_socks); // where int * _socks[MAX_CONNECTION] in struct info
// do other things
rv = sendto(socks[i], msg, sizeof(msg), NULL, &(csys->client_address), sizeof(csys->client_address));
...
}
The problem is all of the arguments i have are pointers. i'm confused as to what is wrong. thanks to any comments/thoughts.
EDIT: sorry about &msg, it was originally just msg but in my desperate attempt i was trying things. added definition of rv.