#include <string>
#include <vector>
+#include <unistd.h>
#include <stdlib.h>
#include <apti18n.h>
if (CmdL.FileSize() != 2)
return _error->Error(_("Need one URL as argument"));
URI ServerURL(CmdL.FileList[1]);
- AutoDetectProxy(ServerURL);
+ if (AutoDetectProxy(ServerURL) == false)
+ return false;
std::string SpecificProxy = _config->Find("Acquire::"+ServerURL.Access+"::Proxy::" + ServerURL.Host);
ioprintf(std::cout, "Using proxy '%s' for URL '%s'\n",
SpecificProxy.c_str(), std::string(ServerURL).c_str());
_error->Error(_("GetSrvRec failed for %s"), name.c_str());
for (SrvRec const &I : srv_records)
- c1out << I.target << "\t" << I.priority << "\t" << I.weight << "\t" << I.port << std::endl;
+ ioprintf(c1out, "%s\t%d\t%d\t%d\n", I.target.c_str(), I.priority, I.weight, I.port);
}
return true;
}
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
- InitLocale();
-
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_HELPER, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);