> Just to complete this thread, here is the version we ended up with.  
 > Changes since last time are that checks for errors on the ioctl for 
 > setting non-blocking mode; removes the local variable "lbolt" entirely; 
 > avoids the final call to ksocket_connect if the callback occurs;  
 > correctly initializes the memory for the structure used for 
 > communication with the callback; and shuts down the socket on connect 
 > timeout to leave the socket in a known state.  Thanks to all for your 
 > help with this.

Looks good.  Still curious about those casts when assigning to ksock_cb_*;
seems to be required because your callback function returns a `void *' but
the actual definition returns `void'.  Not sure why this discrepancy
exists.

Some other nits:

 > idm_so_timed_socket_connect_cb(ksocket_t ks,
 >     ksocket_callback_event_t ev, void *arg, uintptr_t info)
 > {
 >      idm_so_timed_socket_t   *itp = (idm_so_timed_socket_t *)arg;

Cast not needed.

 >      rc = ksocket_setcallbacks(ks, &ks_cb, (void *)&it, CRED());

Likewise.

--
meem
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to