GError *err = NULL;
GInetAddress *addr;
GSocketAddress *saddr;
+ GResolver *resolver;
if (GST_OBJECT_FLAG_IS_SET (this, GST_TCP_CLIENT_SINK_OPEN))
return TRUE;
/* look up name if we need to */
addr = g_inet_address_new_from_string (this->host);
if (!addr) {
- GResolver *resolver = g_resolver_get_default ();
GList *results;
+ resolver = g_resolver_get_default ();
+
results =
g_resolver_lookup_by_name (resolver, this->host, this->cancellable,
&err);
("Failed to resolve host '%s': %s", this->host, err->message));
}
g_clear_error (&err);
+ g_object_unref (resolver);
gst_tcp_client_sink_stop (GST_BASE_SINK (this));
return FALSE;
}
GError *err = NULL;
GInetAddress *addr;
GSocketAddress *saddr;
+ GResolver *resolver;
/* create receiving client socket */
GST_DEBUG_OBJECT (src, "opening receiving client socket to %s:%d",
/* look up name if we need to */
addr = g_inet_address_new_from_string (src->host);
if (!addr) {
- GResolver *resolver = g_resolver_get_default ();
GList *results;
+ resolver = g_resolver_get_default ();
+
results =
g_resolver_lookup_by_name (resolver, src->host, src->cancellable, &err);
if (!results)
("Failed to resolve host '%s': %s", src->host, err->message));
}
g_clear_error (&err);
+ g_object_unref (resolver);
gst_tcp_client_src_stop (GST_BASE_SRC (src));
return FALSE;
}
GError *err = NULL;
GInetAddress *addr;
GSocketAddress *saddr;
+ GResolver *resolver;
/* create the server listener socket */
this->server_socket =
/* look up name if we need to */
addr = g_inet_address_new_from_string (this->host);
if (!addr) {
- GResolver *resolver = g_resolver_get_default ();
GList *results;
+ resolver = g_resolver_get_default ();
+
results =
g_resolver_lookup_by_name (resolver, this->host,
this->element.cancellable, &err);
("Failed to resolve host '%s': %s", this->host, err->message));
}
g_clear_error (&err);
+ g_object_unref (resolver);
gst_tcp_server_sink_close (&this->element);
return FALSE;
}
GError *err = NULL;
GInetAddress *addr;
GSocketAddress *saddr;
+ GResolver *resolver;
/* create the server listener socket */
src->server_socket = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
/* look up name if we need to */
addr = g_inet_address_new_from_string (src->host);
if (!addr) {
- GResolver *resolver = g_resolver_get_default ();
GList *results;
+ resolver = g_resolver_get_default ();
+
results =
g_resolver_lookup_by_name (resolver, src->host, src->cancellable, &err);
if (!results)
("Failed to resolve host '%s': %s", src->host, err->message));
}
g_clear_error (&err);
+ g_object_unref (resolver);
gst_tcp_server_src_stop (GST_BASE_SRC (src));
return FALSE;
}