FreeBSD/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
/*
 * Do local shutdown processing. Let old node go and create new fresh one.
 */
Do local shutdown processing. Let old node go and create new fresh one.
Do local shutdown processing . Let old node go and create new fresh one .
static int
ng_btsocket_sco_node_shutdown(node_p node)
{
	int	error = 0;
	NG_NODE_UNREF(node);
	error = ng_make_node_common(&typestruct, &ng_btsocket_sco_node);
	if (error != 0) {
		NG_BTSOCKET_SCO_ALERT(
"%s: Could not create Netgraph node, error=%d\n", __func__, error);
		ng_btsocket_sco_node = NULL;
		return (error);
	}
	error = ng_name_node(ng_btsocket_sco_node,
				NG_BTSOCKET_SCO_NODE_TYPE);
	if (error != 0) {
		NG_BTSOCKET_SCO_ALERT(
"%s: Could not name Netgraph node, error=%d\n", __func__, error);
		NG_NODE_UNREF(ng_btsocket_sco_node);
		ng_btsocket_sco_node = NULL;
		return (error);
	}
	return (0);
}
static int ng_btsocket_sco_node_shutdown ( node_p node ) { int error = 0 ; NG_NODE_UNREF ( node ) ; error = ng_make_node_common ( & typestruct , & ng_btsocket_sco_node ) ; if ( error != 0 ) { NG_BTSOCKET_SCO_ALERT ( " \n " , __func__ , error ) ; ng_btsocket_sco_node = NULL ; return ( error ) ; } error = ng_name_node ( ng_btsocket_sco_node , NG_BTSOCKET_SCO_NODE_TYPE ) ; if ( error != 0 ) { NG_BTSOCKET_SCO_ALERT ( " \n " , __func__ , error ) ; NG_NODE_UNREF ( ng_btsocket_sco_node ) ; ng_btsocket_sco_node = NULL ; return ( error ) ; } return ( 0 ) ; }
Do local shutdown processing.
Do local shutdown processing .
/* Create new node */