From b4afd84a59578965120f175b410ea325d60bcb58 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 27 Jun 2017 20:47:47 +0200 Subject: methods: connect: Change PkgAcqMethod to aptMethod This will allow us to access ConfigFind() and stuff which makes it possible for us to implement TLS support. Gbp-Dch: ignore --- methods/connect.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'methods/connect.cc') diff --git a/methods/connect.cc b/methods/connect.cc index f6fb14769..d5e40fbab 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -34,6 +34,7 @@ #include #include +#include "aptmethod.h" #include "connect.h" #include "rfc2553emu.h" #include @@ -79,8 +80,8 @@ static bool ConnectionAllowed(char const * const Service, std::string const &Hos // DoConnect - Attempt a connect operation /*{{{*/ // --------------------------------------------------------------------- /* This helper function attempts a connection to a single address. */ -static bool DoConnect(struct addrinfo *Addr,std::string const &Host, - unsigned long TimeOut,int &Fd,pkgAcqMethod *Owner) +static bool DoConnect(struct addrinfo *Addr, std::string const &Host, + unsigned long TimeOut, int &Fd, aptMethod *Owner) { // Show a status indicator char Name[NI_MAXHOST]; @@ -150,8 +151,8 @@ static bool DoConnect(struct addrinfo *Addr,std::string const &Host, /*}}}*/ // Connect to a given Hostname /*{{{*/ static bool ConnectToHostname(std::string const &Host, int const Port, - const char * const Service, int DefPort, int &Fd, - unsigned long const TimeOut, pkgAcqMethod * const Owner) + const char *const Service, int DefPort, int &Fd, + unsigned long const TimeOut, aptMethod *const Owner) { if (ConnectionAllowed(Service, Host) == false) return false; @@ -286,9 +287,9 @@ static bool ConnectToHostname(std::string const &Host, int const Port, // Connect - Connect to a server /*{{{*/ // --------------------------------------------------------------------- /* Performs a connection to the server (including SRV record lookup) */ -bool Connect(std::string Host,int Port,const char *Service, - int DefPort,int &Fd, - unsigned long TimeOut,pkgAcqMethod *Owner) +bool Connect(std::string Host, int Port, const char *Service, + int DefPort, int &Fd, + unsigned long TimeOut, aptMethod *Owner) { if (_error->PendingError() == true) return false; -- cgit v1.2.3