Commit 9e564713 authored by W. Michael Petullo's avatar W. Michael Petullo
parent bd00cb9d
......@@ -415,7 +415,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
GError *error = NULL;
ChunkData *cd = NULL;
cd = g_new (ChunkData, 1);
cd = g_new0 (ChunkData, 1);
g_object_get (record, "location", &location, "has-video", &has_video, NULL);
if (NULL == location) {
......
......@@ -388,11 +388,11 @@ mdns_remote_added (DMAPMdnsBrowser * browser,
{
DACPRemoteInfo *remote_info;
remote_info = g_new (DACPRemoteInfo, 1);
remote_info = g_new0 (DACPRemoteInfo, 1);
remote_info->host = g_strdup (service->host);
remote_info->port = service->port;
remote_info->connection = NULL;
remote_info->pair_txt = g_strdup (service->pair);
remote_info->connection = NULL;
g_debug ("New Remote found: %s name=%s host=%s port=%u pair=%s",
service->service_name,
......
......@@ -1256,7 +1256,7 @@ dmap_connection_connect (DMAPConnection * connection,
g_strdup_printf ("daap://%s:%d", connection->priv->host,
connection->priv->port);
rdata = g_new (ConnectionResponseData, 1);
rdata = g_new0 (ConnectionResponseData, 1);
rdata->connection = g_object_ref (connection);
rdata->callback = callback;
rdata->data = user_data;
......@@ -1334,7 +1334,7 @@ dmap_connection_disconnect (DMAPConnection * connection,
// FIXME: GDK_THREADS_ENTER ();
}
rdata = g_new (ConnectionResponseData, 1);
rdata = g_new0 (ConnectionResponseData, 1);
rdata->connection = g_object_ref (connection);
rdata->callback = callback;
rdata->data = user_data;
......
......@@ -431,7 +431,7 @@ resolve_cb (AvahiServiceResolver * service_resolver,
avahi_address_snprint (host, AVAHI_ADDRESS_STR_MAX, address);
service = g_new (DMAPMdnsBrowserService, 1);
service = g_new0 (DMAPMdnsBrowserService, 1);
service->service_name = g_strdup (service_name);
service->name = name;
service->host = g_strdup (host);
......
......@@ -103,7 +103,7 @@ signal_service_added (ServiceContext *context)
DMAPMdnsBrowserService *service;
service = g_new (DMAPMdnsBrowserService, 1);
service = g_new0 (DMAPMdnsBrowserService, 1);
// FIXME: The name and service_name variables need to be renamed.
// Wait until working on DACP because I think this is when
......@@ -114,6 +114,7 @@ signal_service_added (ServiceContext *context)
service->port = context->service.port;
service->pair = g_strdup (context->service.pair);
service->password_protected = context->service.password_protected;
service->transport_protocol = DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP;
// add to the services list
context->browser->priv->services =
......
......@@ -267,13 +267,15 @@ resolve_cb (sw_discovery discovery,
name = g_strdup (service_name);
}
service = g_new (DMAPMdnsBrowserService, 1);
service = g_new0 (DMAPMdnsBrowserService, 1);
service->service_name = g_strdup (service_name);
service->name = name;
service->host = g_strdup (host);
service->port = port;
service->password_protected = pp;
service->pair = pair;
service->transport_protocol = DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL_TCP;
browser->priv->services =
g_slist_append (browser->priv->services, service);
......
......@@ -284,7 +284,7 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
return FALSE;
}
service = g_new (struct DMAPMdnsPublisherService, 1);
service = g_new0 (struct DMAPMdnsPublisherService, 1);
service->name = g_strdup (name);
service->port = port;
......
......@@ -1786,8 +1786,9 @@ _dmap_share_databases (DMAPShare * share,
*/
/* 1: */
share_bitwise = g_new (struct share_bitwise_t, 1);
share_bitwise = g_new0 (struct share_bitwise_t, 1);
share_bitwise->share = share;
share_bitwise->mb = mb;
share_bitwise->id_list = NULL;
share_bitwise->size = 0;
......@@ -1809,7 +1810,6 @@ _dmap_share_databases (DMAPShare * share,
accumulate_mlcl_size_and_ids,
share_bitwise);
}
share_bitwise->share = share;
/* 2: */
adbs = dmap_structure_add (NULL, DMAP_CC_ADBS);
......
......@@ -514,7 +514,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
GInputStream *stream;
const char *location;
GError *error = NULL;
ChunkData *cd = g_new (ChunkData, 1);
ChunkData *cd = g_new0 (ChunkData, 1);
g_object_get (record, "location", &location, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment