~ubuntu-branches/ubuntu/wily/aria2/wily-proposed

« back to all changes in this revision

Viewing changes to src/AbstractProxyResponseCommand.cc

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry, Patrick Ruckstuhl
  • Date: 2013-09-22 18:52:14 UTC
  • mfrom: (2.5.19 sid)
  • Revision ID: package-import@ubuntu.com-20130922185214-upeu2ljgeqi7e7oo
Tags: 1.18.0-1
[ Kartik Mistry ]
* New upstream release.
* debian/control:
  + (really) Set priority to optional from extra (Closes: #697659).
  + wrap-and-sort some fields.

[ Patrick Ruckstuhl ]
* debian/rules:
  + Allow parallel building (Closes: #720977)
* debian/tests, debian/control:
  + autopkgtest infrastructure

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
AbstractProxyResponseCommand::AbstractProxyResponseCommand
54
54
(cuid_t cuid,
55
 
 const SharedHandle<Request>& req,
56
 
 const SharedHandle<FileEntry>& fileEntry,
 
55
 const std::shared_ptr<Request>& req,
 
56
 const std::shared_ptr<FileEntry>& fileEntry,
57
57
 RequestGroup* requestGroup,
58
 
 const SharedHandle<HttpConnection>& httpConnection,
 
58
 const std::shared_ptr<HttpConnection>& httpConnection,
59
59
 DownloadEngine* e,
60
 
 const SharedHandle<SocketCore>& s)
 
60
 const std::shared_ptr<SocketCore>& s)
61
61
  :AbstractCommand(cuid, req, fileEntry, requestGroup, e, s),
62
62
   httpConnection_(httpConnection) {}
63
63
 
64
64
AbstractProxyResponseCommand::~AbstractProxyResponseCommand() {}
65
65
 
66
66
bool AbstractProxyResponseCommand::executeInternal() {
67
 
  SharedHandle<HttpResponse> httpResponse = httpConnection_->receiveResponse();
 
67
  std::shared_ptr<HttpResponse> httpResponse = httpConnection_->receiveResponse();
68
68
  if(!httpResponse) {
69
69
    // the server has not responded our request yet.
70
 
    getDownloadEngine()->addCommand(this);
 
70
    addCommandSelf();
71
71
    return false;
72
72
  }
73
73
  if(httpResponse->getStatusCode() != 200) {