Просмотр исходного кода

* methods/connect.cc:
- use Errno() instead of strerror(), thanks to David Kalnischk

Michael Vogt лет назад: 13
Родитель
Сommit
5cf466f44e
2 измененных файлов с 6 добавлено и 2 удалено
  1. 4 0
      debian/changelog
  2. 2 2
      methods/connect.cc

+ 4 - 0
debian/changelog

@@ -12,6 +12,10 @@ apt (0.9.7.9~exp2) UNRELEASED; urgency=low
     - fix test now that #1098752 is fixed
   * po/{ca,cs,ru}.po:
     - fix merge artifact
+  
+  [ Michael Vogt ]
+  * methods/connect.cc:
+    - use Errno() instead of strerror(), thanks to David Kalnischk
 
  -- Christian Perrier <bubulle@debian.org>  Sun, 24 Mar 2013 08:57:45 +0100
 

+ 2 - 2
methods/connect.cc

@@ -206,8 +206,8 @@ bool Connect(std::string Host,int Port,const char *Service,int DefPort,int &Fd,
 				    Host.c_str());
 	    }
 	    if (Res == EAI_SYSTEM)
-	       return _error->Error(_("System error resolving '%s:%s' (%s)"),
-				    Host.c_str(),ServStr,strerror(errno));
+	       return _error->Errno("getaddrinfo", _("System error resolving '%s:%s'"),
+                                      Host.c_str(),ServStr);
 	    return _error->Error(_("Something wicked happened resolving '%s:%s' (%i - %s)"),
 				 Host.c_str(),ServStr,Res,gai_strerror(Res));
 	 }