~ubuntu-branches/ubuntu/natty/apt/natty

« back to all changes in this revision

Viewing changes to apt-pkg/acquire-method.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-03-16 08:23:19 UTC
  • Revision ID: james.westby@ubuntu.com-20110316082319-o512jy2pwa5i13do
Tags: 0.8.13ubuntu1
merged from debian/sid, this adds important fixes in the
apt mirror method

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
   if (Res.ResumePoint != 0)
150
150
      End += snprintf(End,sizeof(S)-4 - (End - S),"Resume-Point: %lu\n",
151
151
                      Res.ResumePoint);
 
152
   if (UsedMirror.empty() == false)
 
153
      End += snprintf(End,sizeof(S)-4 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str());
152
154
      
153
155
   strcat(End,"\n");
154
156
   if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
418
420
 
419
421
   // sprintf the description
420
422
   char S[1024];
421
 
   unsigned int Len = snprintf(S,sizeof(S)-4,"101 Log\nURI: %s\n"
422
 
                               "Message: ",CurrentURI.c_str());
423
 
 
 
423
   unsigned int Len = snprintf(S,sizeof(S)-4,"101 Log\n"
 
424
                               "URI: %s\n"
 
425
                               "UsedMirror: %s\n"
 
426
                               "Message: ", UsedMirror.c_str(),
 
427
                               CurrentURI.c_str());
424
428
   vsnprintf(S+Len,sizeof(S)-4-Len,Format,args);
425
429
   strcat(S,"\n\n");
426
430
   
442
446
 
443
447
   // sprintf the description
444
448
   char S[1024];
445
 
   unsigned int Len = snprintf(S,sizeof(S)-4,"102 Status\nURI: %s\n"
446
 
                               "Message: ",CurrentURI.c_str());
 
449
   unsigned int Len = snprintf(S,sizeof(S)-4,"102 Status\n"
 
450
                               "URI: %s\n"
 
451
                               "UsedMirror: %s\n"
 
452
                               "Message: ",UsedMirror.c_str(),
 
453
                               CurrentURI.c_str());
447
454
 
448
455
   vsnprintf(S+Len,sizeof(S)-4-Len,Format,args);
449
456
   strcat(S,"\n\n");