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