library/src/network/BP-Network.cc
BP_ERROR_T BP_NetProxyResetAllProxyFlags(P_BP_NETWORK_HANDLE net_handle)
{

	// ensure we have a network handle
	if(!net_handle)
		return ERR_FAILURE;

	// ensure we have a proxy info structure
	if(!net_handle->proxy_info)
		return ERR_FAILURE;

	// ensure we have proxies within the proxy info
	// structure.
	if(!net_handle->proxy_info->proxy_chain_n || !net_handle->proxy_info->proxy_chain)
		return ERR_FAILURE;

	// reference pointer used for convienence within the lower loop
	P_BP_NETWORK_PROXY current_proxy = NULL;

	// walk the chain and attempt connects
	size_t n = 0;
	for(; n < net_handle->proxy_info->proxy_chain_n; n++)
	{

		// set handle to current proxy
		current_proxy = &net_handle->proxy_info->proxy_chain[n];

		// reset the proxy flags
		BP_NetProxyResetFlags(&net_handle->proxy_info->proxy_chain[n]);

	}

	// return indicating success
	return ERR_SUCCESS;

}
// This routine will clear out all proxy flags which may have been set
// during previous connect calls.  This is typically used when tearing
// down established chains.
This routine will clear out all proxy flags which may have been set
during previous connect calls.  This is typically used when tearing
down established chains.
This routine will clear out all proxy flags which may have been set during previous connect calls . This is typically used when tearing down established chains .
BP_ERROR_T BP_NetProxyResetAllProxyFlags(P_BP_NETWORK_HANDLE net_handle)
{
	if(!net_handle)
		return ERR_FAILURE;
	if(!net_handle->proxy_info)
		return ERR_FAILURE;
	if(!net_handle->proxy_info->proxy_chain_n || !net_handle->proxy_info->proxy_chain)
		return ERR_FAILURE;
	P_BP_NETWORK_PROXY current_proxy = NULL;
	size_t n = 0;
	for(; n < net_handle->proxy_info->proxy_chain_n; n++)
	{
		current_proxy = &net_handle->proxy_info->proxy_chain[n];
		BP_NetProxyResetFlags(&net_handle->proxy_info->proxy_chain[n]);
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_NetProxyResetAllProxyFlags ( P_BP_NETWORK_HANDLE net_handle ) { if ( ! net_handle ) return ERR_FAILURE ; if ( ! net_handle -> proxy_info ) return ERR_FAILURE ; if ( ! net_handle -> proxy_info -> proxy_chain_n || ! net_handle -> proxy_info -> proxy_chain ) return ERR_FAILURE ; P_BP_NETWORK_PROXY current_proxy = NULL ; size_t n = 0 ; for ( ; n < net_handle -> proxy_info -> proxy_chain_n ; n ++ ) { current_proxy = & net_handle -> proxy_info -> proxy_chain [ n ] ; BP_NetProxyResetFlags ( & net_handle -> proxy_info -> proxy_chain [ n ] ) ; } return ERR_SUCCESS ; }
This routine will clear out all proxy flags which may have been set
during previous connect calls.
This routine will clear out all proxy flags which may have been set during previous connect calls .
// ensure we have a network handle // ensure we have a proxy info structure // ensure we have proxies within the proxy info // structure. // reference pointer used for convienence within the lower loop // walk the chain and attempt connects // set handle to current proxy // reset the proxy flags // return indicating success