When used as divert socket we need to decouple stack when node is entered
from socket side. Use ng_queue_fn() instead of ng_send_fn().
This commit is contained in:
parent
aacdb11479
commit
0f4a3524dd
@ -1001,6 +1001,8 @@ ng_ksocket_disconnect(hook_p hook)
|
|||||||
* the request has at least been done, but the 'so' may not be so lucky.
|
* the request has at least been done, but the 'so' may not be so lucky.
|
||||||
* handle this by checking the validity of the node in the target function
|
* handle this by checking the validity of the node in the target function
|
||||||
* before dereferencing the socket pointer.
|
* before dereferencing the socket pointer.
|
||||||
|
*
|
||||||
|
* To decouple stack, we use queue version of ng_send_fn().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1008,7 +1010,7 @@ ng_ksocket_incoming(struct socket *so, void *arg, int waitflag)
|
|||||||
{
|
{
|
||||||
const node_p node = arg;
|
const node_p node = arg;
|
||||||
|
|
||||||
ng_send_fn(node, NULL, &ng_ksocket_incoming2, so, waitflag);
|
ng_queue_fn(node, NULL, &ng_ksocket_incoming2, so, waitflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user