[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] [PATCH] fix use of hostname from parsed uri
From: |
Roland McGrath |
Subject: |
[Monotone-devel] [PATCH] fix use of hostname from parsed uri |
Date: |
Fri, 26 Sep 2008 05:09:47 -0700 (PDT) |
This looks like an obvious fix. Without this, the local variable 'host' is
set and then never used. For me, this seems to make:
mtn sync mtn://server/
work happily. By making that:
mtn sync mtn://server/foobar
I think this is already all that was needed for usher to get really useful
for sensible multi-db hosting. So I hope this fix goes in ASAP!
(Beyond this, it seems like there ought to be some actual checking on the
uri scheme, instead of treating any scheme name not handle by the lua hook
as meaning netsync.)
Thanks,
Roland
#
# old_revision [6341444c06293469f66f1c431063282004c5be9d]
#
# patch "netsync.cc"
# from [faa9a58eb3dd3f07ec771969251ba8c5c8f2d91d]
# to [500fec0e1c25b6ed2e1cf03ee6bd25039e1a1e01]
#
============================================================
--- netsync.cc faa9a58eb3dd3f07ec771969251ba8c5c8f2d91d
+++ netsync.cc 500fec0e1c25b6ed2e1cf03ee6bd25039e1a1e01
@@ -2461,8 +2461,7 @@ build_stream_to_server(options & opts, l
host = info.client.unparsed();
if (!info.client.u.port.empty())
default_port = lexical_cast<Netxx::port_type>(info.client.u.port);
- Netxx::Address addr(info.client.unparsed().c_str(),
- default_port, use_ipv6);
+ Netxx::Address addr(host.c_str(), default_port, use_ipv6);
return shared_ptr<Netxx::StreamBase>
(new Netxx::Stream(addr, timeout));
}
- [Monotone-devel] [PATCH] fix use of hostname from parsed uri,
Roland McGrath <=