r256 - in /apt-transport-debtorrent/trunk: Makefile apti18n.h connect.cc debian/changelog debian/control debtorrent.cc
camrdale-guest at users.alioth.debian.org
camrdale-guest at users.alioth.debian.org
Wed Aug 15 19:57:41 UTC 2007
Author: camrdale-guest
Date: Wed Aug 15 19:57:41 2007
New Revision: 256
URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=256
Log:
Remove the i18n.
Removed:
apt-transport-debtorrent/trunk/apti18n.h
Modified:
apt-transport-debtorrent/trunk/Makefile
apt-transport-debtorrent/trunk/connect.cc
apt-transport-debtorrent/trunk/debian/changelog
apt-transport-debtorrent/trunk/debian/control
apt-transport-debtorrent/trunk/debtorrent.cc
Modified: apt-transport-debtorrent/trunk/Makefile
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/Makefile?rev=256&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/Makefile (original)
+++ apt-transport-debtorrent/trunk/Makefile Wed Aug 15 19:57:41 2007
@@ -15,7 +15,7 @@
$(debtorrent_DEPS) : .%.d : %.cc
$(CXX) -MM $(CXXFLAGS) $< > $@
-include $(debtorrent_DEPS)
+include $(debtorrent_DEPS)
debtorrent : $(debtorrent_OBJS)
$(CXX) -o $@ $(debtorrent_OBJS) $(LDLIBS)
Modified: apt-transport-debtorrent/trunk/connect.cc
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/connect.cc?rev=256&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/connect.cc (original)
+++ apt-transport-debtorrent/trunk/connect.cc Wed Aug 15 19:57:41 2007
@@ -26,7 +26,6 @@
#include <netdb.h>
#include "rfc2553emu.h"
-#include "apti18n.h"
/*}}}*/
static string LastHost;
@@ -61,14 +60,14 @@
getnameinfo(Addr->ai_addr,Addr->ai_addrlen,
Name,sizeof(Name),Service,sizeof(Service),
NI_NUMERICHOST|NI_NUMERICSERV);
- Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name);
+ Owner->Status("Connecting to %s (%s)",Host.c_str(),Name);
/* If this is an IP rotation store the IP we are using.. If something goes
wrong this will get tacked onto the end of the error message */
if (LastHostAddr->ai_next != 0)
{
char Name2[NI_MAXHOST + NI_MAXSERV + 10];
- snprintf(Name2,sizeof(Name2),_("[IP: %s %s]"),Name,Service);
+ snprintf(Name2,sizeof(Name2),"[IP: %s %s]",Name,Service);
Owner->SetFailExtraMsg(string(Name2));
}
else
@@ -77,35 +76,35 @@
// Get a socket
if ((Fd = socket(Addr->ai_family,Addr->ai_socktype,
Addr->ai_protocol)) < 0)
- return _error->Errno("socket",_("Could not create a socket for %s (f=%u t=%u p=%u)"),
+ return _error->Errno("socket","Could not create a socket for %s (f=%u t=%u p=%u)",
Name,Addr->ai_family,Addr->ai_socktype,Addr->ai_protocol);
SetNonBlock(Fd,true);
if (connect(Fd,Addr->ai_addr,Addr->ai_addrlen) < 0 &&
errno != EINPROGRESS)
- return _error->Errno("connect",_("Cannot initiate the connection "
- "to %s:%s (%s)."),Host.c_str(),Service,Name);
+ return _error->Errno("connect","Cannot initiate the connection "
+ "to %s:%s (%s).",Host.c_str(),Service,Name);
/* This implements a timeout for connect by opening the connection
nonblocking */
if (WaitFd(Fd,true,TimeOut) == false) {
Owner->SetFailExtraMsg("\nFailReason: Timeout");
- return _error->Error(_("Could not connect to %s:%s (%s), "
- "connection timed out"),Host.c_str(),Service,Name);
+ return _error->Error("Could not connect to %s:%s (%s), "
+ "connection timed out",Host.c_str(),Service,Name);
}
// Check the socket for an error condition
unsigned int Err;
unsigned int Len = sizeof(Err);
if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
- return _error->Errno("getsockopt",_("Failed"));
+ return _error->Errno("getsockopt","Failed");
if (Err != 0)
{
errno = Err;
if(errno == ECONNREFUSED)
Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
- return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
+ return _error->Errno("connect","Could not connect to %s:%s (%s).",Host.c_str(),
Service,Name);
}
@@ -133,7 +132,7 @@
sensible */
if (LastHost != Host || LastPort != Port)
{
- Owner->Status(_("Connecting to %s"),Host.c_str());
+ Owner->Status("Connecting to %s",Host.c_str());
// Free the old address structure
if (LastHostAddr != 0)
@@ -164,16 +163,16 @@
DefPort = 0;
continue;
}
- return _error->Error(_("Could not resolve '%s'"),Host.c_str());
+ return _error->Error("Could not resolve '%s'",Host.c_str());
}
if (Res == EAI_AGAIN)
{
Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure");
- return _error->Error(_("Temporary failure resolving '%s'"),
+ return _error->Error("Temporary failure resolving '%s'",
Host.c_str());
}
- return _error->Error(_("Something wicked happened resolving '%s:%s' (%i)"),
+ return _error->Error("Something wicked happened resolving '%s:%s' (%i)",
Host.c_str(),ServStr,Res);
}
break;
@@ -220,6 +219,6 @@
if (_error->PendingError() == true)
return false;
- return _error->Error(_("Unable to connect to %s %s:"),Host.c_str(),ServStr);
+ return _error->Error("Unable to connect to %s %s:",Host.c_str(),ServStr);
}
/*}}}*/
Modified: apt-transport-debtorrent/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/debian/changelog?rev=256&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/debian/changelog (original)
+++ apt-transport-debtorrent/trunk/debian/changelog Wed Aug 15 19:57:41 2007
@@ -6,5 +6,6 @@
* Remove the limit on the download bandwidth
* Remove the limit on pipelining
* Allow requests to be returned in any order
+ * Remove the i18n
-- Cameron Dale <camrdale at gmail.com> Wed, 14 Aug 2007 20:59:00 -0700
Modified: apt-transport-debtorrent/trunk/debian/control
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/debian/control?rev=256&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/debian/control (original)
+++ apt-transport-debtorrent/trunk/debian/control Wed Aug 15 19:57:41 2007
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Cameron Dale <camrdale at gmail.com>
Standards-Version: 3.7.2.2
-Build-Depends: debhelper (>= 5.0), gettext (>= 0.12), libapt-pkg-dev
+Build-Depends: debhelper (>= 5.0), libapt-pkg-dev
XS-Vcs-Svn: svn://svn.debian.org/debtorrent/apt-transport-debtorrent/trunk
XS-Vcs-Browser: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/
Modified: apt-transport-debtorrent/trunk/debtorrent.cc
URL: http://svn.debian.org/wsvn/debtorrent/apt-transport-debtorrent/trunk/debtorrent.cc?rev=256&op=diff
==============================================================================
--- apt-transport-debtorrent/trunk/debtorrent.cc (original)
+++ apt-transport-debtorrent/trunk/debtorrent.cc Wed Aug 15 19:57:41 2007
@@ -55,7 +55,6 @@
#include <errno.h>
#include <string.h>
#include <iostream>
-#include "apti18n.h"
// Internet stuff
#include <netdb.h>
@@ -353,7 +352,7 @@
{
State = Header;
- Owner->Status(_("Waiting for headers"));
+ Owner->Status("Waiting for headers");
Major = 0;
Minor = 0;
@@ -499,7 +498,7 @@
// The http server might be trying to do something evil.
if (Line.length() >= MAXLEN)
- return _error->Error(_("Got a single header line over %u chars"),MAXLEN);
+ return _error->Error("Got a single header line over %u chars",MAXLEN);
string::size_type Pos = Line.find(' ');
if (Pos == string::npos || Pos+1 > Line.length())
@@ -507,7 +506,7 @@
// Blah, some servers use "connection:closes", evil.
Pos = Line.find(':');
if (Pos == string::npos || Pos + 2 > Line.length())
- return _error->Error(_("Bad header line"));
+ return _error->Error("Bad header line");
Pos++;
}
@@ -523,7 +522,7 @@
{
if (sscanf(Line.c_str(),"DEBTORRENT/%u.%u %s %u %[^\n]",&Major,&Minor,
ResultPath,&Result,Code) != 5)
- return _error->Error(_("The HTTP server sent an invalid reply header"));
+ return _error->Error("The DebTorrent client sent an invalid reply header");
// DEBTORRENT connections are always persistent
Persistent = true;
@@ -542,7 +541,7 @@
return true;
if (sscanf(Val.c_str(),"%lu",&Size) != 1)
- return _error->Error(_("The HTTP server sent an invalid Content-Length header"));
+ return _error->Error("The DebTorrent client sent an invalid Content-Length header");
return true;
}
@@ -557,9 +556,9 @@
HaveContent = true;
if (sscanf(Val.c_str(),"bytes %lu-%*u/%lu",&StartPos,&Size) != 2)
- return _error->Error(_("The HTTP server sent an invalid Content-Range header"));
+ return _error->Error("The DebTorrent client sent an invalid Content-Range header");
if ((unsigned)StartPos > Size)
- return _error->Error(_("This HTTP server has broken range support"));
+ return _error->Error("This DebTorrent client has broken range support");
return true;
}
@@ -583,7 +582,7 @@
if (stringcasecmp(Tag,"Last-Modified:") == 0)
{
if (StrToTime(Val,Date) == false)
- return _error->Error(_("Unknown date format"));
+ return _error->Error("Unknown date format");
return true;
}
@@ -697,12 +696,12 @@
{
if (errno == EINTR)
return true;
- return _error->Errno("select",_("Select failed"));
+ return _error->Errno("select","Select failed");
}
if (Res == 0)
{
- _error->Error(_("Connection timed out"));
+ _error->Error("Connection timed out");
return ServerDie(Srv);
}
@@ -725,7 +724,7 @@
if (FileFD != -1 && FD_ISSET(FileFD,&wfds))
{
if (Srv->In.Write(FileFD) == false)
- return _error->Errno("write",_("Error writing to output file"));
+ return _error->Errno("write","Error writing to output file");
}
// Handle commands from APT
@@ -756,7 +755,7 @@
while (Srv->In.WriteSpace() == true)
{
if (Srv->In.Write(File->Fd()) == false)
- return _error->Errno("write",_("Error writing to file"));
+ return _error->Errno("write","Error writing to file");
if (Srv->In.IsLimit() == true)
return true;
}
@@ -784,7 +783,7 @@
while (Srv->In.WriteSpace() == true)
{
if (Srv->In.Write(File->Fd()) == false)
- return _error->Errno("write",_("Error writing to the file"));
+ return _error->Errno("write","Error writing to the file");
// Done
if (Srv->In.IsLimit() == true)
@@ -798,9 +797,9 @@
{
Srv->Close();
if (LErrno == 0)
- return _error->Error(_("Error reading from server. Remote end closed connection"));
+ return _error->Error("Error reading from DebTorrent client. Remote end closed connection");
errno = LErrno;
- return _error->Errno("read",_("Error reading from server"));
+ return _error->Errno("read","Error reading from DebTorrent client");
}
else
{
@@ -931,7 +930,7 @@
lseek(File->Fd(),0,SEEK_SET);
if (Srv->In.Hash->AddFD(File->Fd(),Srv->StartPos) == false)
{
- _error->Errno("read",_("Problem hashing file"));
+ _error->Errno("read","Problem hashing file");
return 5;
}
lseek(File->Fd(),0,SEEK_END);
@@ -1073,7 +1072,7 @@
// The header data is bad
case 2:
{
- _error->Error(_("Bad header data"));
+ _error->Error("Bad header data");
Fail(true);
RotateDNS();
continue;
@@ -1090,7 +1089,7 @@
if (FailCounter >= 2)
{
- Fail(_("Connection failed"),true);
+ Fail("Connection failed",true);
FailCounter = 0;
}
@@ -1147,7 +1146,7 @@
if (FailCounter >= 2)
{
- Fail(_("Connection failed"),true);
+ Fail("Connection failed",true);
FailCounter = 0;
}
@@ -1199,7 +1198,7 @@
}
default:
- Fail(_("Internal error"));
+ Fail("Internal error");
break;
}
}
@@ -1209,7 +1208,7 @@
delete File;
File = 0;
- Fail(_("Data returned for an unrequested file"));
+ Fail("Data returned for an unrequested file");
RotateDNS();
Server->Close();
}
More information about the Debtorrent-commits
mailing list