summaryrefslogtreecommitdiff
path: root/methods/rsh.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/rsh.cc')
-rw-r--r--methods/rsh.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/methods/rsh.cc b/methods/rsh.cc
index c95a4d3eb..add128c49 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -32,7 +32,7 @@ const char *Prog;
unsigned long TimeOut = 120;
Configuration::Item const *RshOptions = 0;
time_t RSHMethod::FailTime = 0;
-string RSHMethod::FailFile;
+std::string RSHMethod::FailFile;
int RSHMethod::FailFd = -1;
// RSHConn::RSHConn - Constructor /*{{{*/
@@ -85,7 +85,7 @@ bool RSHConn::Open()
// RSHConn::Connect - Fire up rsh and connect /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool RSHConn::Connect(string Host, string User)
+bool RSHConn::Connect(std::string Host, std::string User)
{
// Create the pipes
int Pipes[4] = {-1,-1,-1,-1};
@@ -154,7 +154,7 @@ bool RSHConn::Connect(string Host, string User)
// RSHConn::ReadLine - Very simple buffered read with timeout /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool RSHConn::ReadLine(string &Text)
+bool RSHConn::ReadLine(std::string &Text)
{
if (Process == -1 || ReadFd == -1)
return false;
@@ -174,7 +174,7 @@ bool RSHConn::ReadLine(string &Text)
continue;
I++;
- Text = string(Buffer,I);
+ Text = std::string(Buffer,I);
memmove(Buffer,Buffer+I,Len - I);
Len -= I;
return true;
@@ -205,7 +205,7 @@ bool RSHConn::ReadLine(string &Text)
// ---------------------------------------------------------------------
/* The remote sync flag appends a || echo which will insert blank line
once the command completes. */
-bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...)
+bool RSHConn::WriteMsg(std::string &Text,bool Sync,const char *Fmt,...)
{
va_list args;
va_start(args,Fmt);
@@ -254,7 +254,7 @@ bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...)
bool RSHConn::Size(const char *Path,unsigned long long &Size)
{
// Query the size
- string Msg;
+ std::string Msg;
Size = 0;
if (WriteMsg(Msg,true,"find %s -follow -printf '%%s\\n'",Path) == false)
@@ -276,7 +276,7 @@ bool RSHConn::ModTime(const char *Path, time_t &Time)
{
Time = time(&Time);
// Query the mod time
- string Msg;
+ std::string Msg;
if (WriteMsg(Msg,true,"TZ=UTC find %s -follow -printf '%%TY%%Tm%%Td%%TH%%TM%%TS\\n'",Path) == false)
return false;
@@ -309,7 +309,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long long Resume,
}
// FIXME: Detect file-not openable type errors.
- string Jnk;
+ std::string Jnk;
if (WriteMsg(Jnk,false,"dd if=%s bs=2048 skip=%u", Path, Resume / 2048) == false)
return false;
@@ -366,7 +366,7 @@ RSHMethod::RSHMethod() : pkgAcqMethod("1.0",SendConfig)
/*}}}*/
// RSHMethod::Configuration - Handle a configuration message /*{{{*/
// ---------------------------------------------------------------------
-bool RSHMethod::Configuration(string Message)
+bool RSHMethod::Configuration(std::string Message)
{
char ProgStr[100];