diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-01-20 14:20:44 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-01-20 14:20:44 +0100 |
commit | 9732ae812bb8329b213441e39c4b2a6c0e122352 (patch) | |
tree | 437e4b9cc265e089cd98e8b577d81ff0aff206f2 /gio/src/resolver.ccg | |
parent | 8480c0cebce1e3512b9ca8f7a877d0f0a0de9a41 (diff) | |
download | glibmm-9732ae812bb8329b213441e39c4b2a6c0e122352.tar.gz |
Resolver: lookup_service(), lookup_by_address(): Fix the reference counting.
* gio/src/resolver.[hg|ccg]: Use the correct OWNERSHIP_*, based on the
documentation for the C functions. We must release both the list and the
items.
Diffstat (limited to 'gio/src/resolver.ccg')
-rw-r--r-- | gio/src/resolver.ccg | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/src/resolver.ccg b/gio/src/resolver.ccg index 4134c598..fb63c06f 100644 --- a/gio/src/resolver.ccg +++ b/gio/src/resolver.ccg @@ -36,7 +36,7 @@ void Resolver::set_default(const Glib::RefPtr<Resolver>& resolver) Glib::ListHandle< Glib::RefPtr<InetAddress> > Resolver::lookup_by_name(const Glib::ustring& hostname) { GError* gerror = 0; - Glib::ListHandle< Glib::RefPtr<InetAddress> > retvalue = Glib::ListHandle< Glib::RefPtr<InetAddress> >(g_resolver_lookup_by_name(gobj(), hostname.c_str(), 0, &(gerror)), Glib::OWNERSHIP_SHALLOW); + Glib::ListHandle< Glib::RefPtr<InetAddress> > retvalue = Glib::ListHandle< Glib::RefPtr<InetAddress> >(g_resolver_lookup_by_name(gobj(), hostname.c_str(), 0, &(gerror)), Glib::OWNERSHIP_DEEP); if(gerror) ::Glib::Error::throw_exception(gerror); @@ -58,7 +58,7 @@ Glib::ustring Resolver::lookup_by_address(const Glib::RefPtr<InetAddress>& addre ListHandle_SrvTarget Resolver::lookup_service(const Glib::ustring& service, const Glib::ustring& protocol, const Glib::ustring& domain) { GError* gerror = 0; - ListHandle_SrvTarget retvalue = ListHandle_SrvTarget(g_resolver_lookup_service(gobj(), service.c_str(), protocol.c_str(), domain.c_str(), 0, &(gerror)), Glib::OWNERSHIP_SHALLOW); + ListHandle_SrvTarget retvalue = ListHandle_SrvTarget(g_resolver_lookup_service(gobj(), service.c_str(), protocol.c_str(), domain.c_str(), 0, &(gerror)), Glib::OWNERSHIP_DEEP); if(gerror) ::Glib::Error::throw_exception(gerror); |