openbsd-ports/www/sqtop/patches/patch-src_sqtop_cpp
william db6acedc9f Integrate changes present in upstream git, repairing sqtop's use with
squid 3.3.5.  It also fixes ipv6 and other stuff, details of which can
be found here:  https://code.google.com/p/sqtop/source/list

Update MAINTAINER email address at his request while here.

ok gonzalo (MAINTAINER) and sthen
2013-06-30 03:17:43 +00:00

31 lines
1006 B
Plaintext

$OpenBSD: patch-src_sqtop_cpp,v 1.1 2013/06/30 03:17:43 william Exp $
Revision: 21859c656dbc: sqtop: set resolving opts before getting info from squid
--- src/sqtop.cpp.orig Fri Nov 4 16:10:30 2011
+++ src/sqtop.cpp Wed Jun 26 21:30:44 2013
@@ -266,6 +266,10 @@ int main(int argc, char **argv) {
#endif
sqstat sqs;
std::vector<SQUID_Connection> stat;
+#ifdef WITH_RESOLVER
+ pOpts->pResolver->resolve_mode = Resolver::RESOLVE_SYNC;
+#endif
+ pOpts->speed_mode = Options::SPEED_AVERAGE;
try {
stat = sqs.GetInfo(pOpts);
}
@@ -273,11 +277,7 @@ int main(int argc, char **argv) {
cerr << e.what() << endl;
exit(1);
}
- pOpts->speed_mode = Options::SPEED_AVERAGE;
cout << sqstat::HeadFormat(pOpts, sqs.active_conn, stat.size(), sqs.av_speed) << endl;
-#ifdef WITH_RESOLVER
- pOpts->pResolver->resolve_mode = Resolver::RESOLVE_SYNC;
-#endif
cout << conns_format(pOpts, stat) << endl;
#ifdef ENABLE_UI
}