[libdmapsharing] Work on dns_sd mDNS backend.
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Work on dns_sd mDNS backend.
- Date: Sun, 23 Aug 2009 01:40:04 +0000 (UTC)
commit bc48137fbc5ce5121007eabfbaea8b02099f1a4c
Author: W. Michael Petullo <mike flyn org>
Date: Sat Aug 22 21:39:01 2009 -0400
Work on dns_sd mDNS backend.
ChangeLog | 19 ++++++++
TODO | 7 ---
autogen.sh | 2 +-
configure.ac | 4 +-
libdmapsharing/Makefile.am | 2 +-
libdmapsharing/daap-share.c | 9 ++++
libdmapsharing/dmap-mdns-publisher-dnssd.c | 63 ++++++++++++++++++++++-----
libdmapsharing/dmap.h | 1 +
libdmapsharing/g-gst-mp3-input-stream.c | 9 ++++
libdmapsharing/g-gst-wav-input-stream.c | 9 ++++
tests/test-daap-record-factory.h | 2 +-
tests/test-daap-record.c | 12 +++++-
tests/test-daap-record.h | 2 +-
tests/test-dmap-client.c | 6 +--
tests/test-dmap-container-db.h | 2 +-
tests/test-dmap-container-record.c | 44 +++++++++++++++++++
tests/test-dmap-container-record.h | 2 +-
tests/test-dmap-db.h | 2 +-
tests/test-dmap-server.c | 23 +++++++---
tests/test-dpap-record-factory.h | 2 +-
tests/test-dpap-record.c | 5 ++
tests/test-dpap-record.h | 2 +-
22 files changed, 187 insertions(+), 42 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cd5305e..0865ec4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+22 August 2009 W. Michael Petullo <mike flyn org>
+
+ * Work on dns_sd mDNS backend.
+
+ * Make autogen.sh work with MacPorts.
+
+17 August 2009 W. Michael Petullo <mike flyn org>
+
+ * Update tests to include dmap.h.
+
+ * Ensure values g_free'd before set in D[AP]APRecord's
+ set_properties.
+
+ * Add dmap-mdns-publisher.h back to installed headers.
+
+16 August 2009 W. Michael Petullo <mike flyn org>
+
+ * Add finalize function for TestDAAPRecord and TestDPAPRecord.
+
15 August 2009 W. Michael Petullo <mike flyn org>
* Documentation.
diff --git a/TODO b/TODO
index afe2084..0872035 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,3 @@
-cc1: warnings being treated as errors
-daap-connection.c: In function 'daap_connection_build_message':
-/usr/include/glib-2.0/glib/gthread.h:344: error: dereferencing pointer '_SOUP_METHOD_GET.21' does break strict-aliasing rules
-daap-connection.c:96: note: initialized from here
-
Ensure client test catches newly shared files?
Do transcode based on client?
@@ -127,7 +122,5 @@ See FIXME's in dmap-share.c, daap-share.c and dpap-share.c.
Comment purpose of each source file and describe interfaces, using test
programs as examples.
-Submit as a GNOME or Freedesktop project (google "gnome new module").
-
Allow both DPAP and DAAP sharing in one process (using two threads
instead of two processes).
diff --git a/autogen.sh b/autogen.sh
index bbcedb3..616af9c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,7 +4,7 @@ gtkdocize || exit 1
aclocal -I m4 || exit 1
autoconf || exit 1
autoheader || exit 1
-libtoolize --force || exit 1
+libtoolize --force || glibtoolize --force || exit 1
automake -a || exit 1
./configure $* || exit 1
diff --git a/configure.ac b/configure.ac
index 6783c31..0c0bc06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
-AC_INIT(libdmapsharing, 1.9.0.11)
+AC_INIT(libdmapsharing, 1.9.0.12)
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
-AS_VERSION(libdmapsharing, LIBDMAPSHARING, 1, 9, 0, 11, LIBDMAPSHARING_CVS="no", LIBDMAPSHARING_CVS="yes")
+AS_VERSION(libdmapsharing, LIBDMAPSHARING, 1, 9, 0, 12, LIBDMAPSHARING_CVS="no", LIBDMAPSHARING_CVS="yes")
AM_INIT_AUTOMAKE
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index 40a0879..8989bf0 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -66,6 +66,7 @@ libdmapsharinginclude_HEADERS = \
dmap-container-record.h \
dmap-db.h \
dmap-mdns-browser.h \
+ dmap-mdns-publisher.h \
dmap-record.h \
dmap-record-factory.h \
dmap-share.h \
@@ -78,7 +79,6 @@ noinst_HEADERS = \
dmap-config.h \
dmap-md5.h \
dmap-mdns-avahi.h \
- dmap-mdns-publisher.h \
dmap-structure.h \
dmap-utils.h \
g-gst-input-stream.h \
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
index 017ca6b..640c49e 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/daap-share.c
@@ -482,6 +482,7 @@ send_chunked_file (SoupServer *server, SoupMessage *message, DAAPRecord *record,
g_warning ("Couldn't open %s: %s.", location, error->message);
g_error_free (error);
soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
+ g_free (cd);
return;
}
@@ -498,11 +499,18 @@ send_chunked_file (SoupServer *server, SoupMessage *message, DAAPRecord *record,
cd->stream = stream;
}
+ if (cd->stream == NULL) {
+ g_warning ("Could not set up input stream");
+ g_free (cd);
+ return;
+ }
+
if (offset != 0) {
if (g_seekable_seek (G_SEEKABLE (cd->stream), offset, G_SEEK_SET, NULL, &error) == FALSE) {
g_warning ("Error seeking: %s.", error->message);
g_input_stream_close (cd->stream, NULL, NULL);
soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
+ g_free (cd);
return;
}
filesize -= offset;
@@ -553,6 +561,7 @@ send_chunked_file (SoupServer *server, SoupMessage *message, DAAPRecord *record,
g_signal_connect (message, "wrote_headers", G_CALLBACK (write_next_chunk), cd);
g_signal_connect (message, "wrote_chunk", G_CALLBACK (write_next_chunk), cd);
g_signal_connect (message, "finished", G_CALLBACK (chunked_message_finished), cd);
+ /* NOTE: cd g_free'd by chunked_message_finished(). */
}
static void
diff --git a/libdmapsharing/dmap-mdns-publisher-dnssd.c b/libdmapsharing/dmap-mdns-publisher-dnssd.c
index 61648e7..cb885c5 100644
--- a/libdmapsharing/dmap-mdns-publisher-dnssd.c
+++ b/libdmapsharing/dmap-mdns-publisher-dnssd.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <glib.h>
#include <dns_sd.h>
+#include <arpa/inet.h>
#include "dmap-mdns-publisher.h"
@@ -30,11 +31,19 @@ struct DmapMdnsPublisherPrivate
{
DNSServiceRef sdref;
char *name;
- guint port;
+ guint16 port;
char *type_of_service;
gboolean password_required;
};
+enum {
+ PUBLISHED,
+ NAME_COLLISION,
+ LAST_SIGNAL
+};
+
+static guint signals [LAST_SIGNAL] = { 0, };
+
G_DEFINE_TYPE (DmapMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
static gpointer publisher_object = NULL;
@@ -133,30 +142,39 @@ dmap_mdns_publisher_publish (DmapMdnsPublisher *publisher,
gboolean password_required,
GError **error)
{
- if (DNSServiceRegister (&publisher->priv->sdref,
+ int dns_err;
+
+ publisher_set_name_internal (publisher, name, NULL);
+ publisher_set_port_internal (publisher, port, NULL);
+ publisher_set_type_of_service_internal (publisher, type_of_service, NULL);
+ publisher_set_password_required_internal (publisher, password_required, NULL);
+
+ g_warning ("%s %s %d", publisher->priv->name, publisher->priv->type_of_service, publisher->priv->port);
+ if ((dns_err = DNSServiceRegister (&publisher->priv->sdref,
0,
0,
- publisher->priv->name,
- publisher->priv->type_of_service,
+ name,
+ type_of_service,
NULL,
NULL,
- publisher->priv->port,
+ //port,
+ (uint16_t) htons (3689),
0,
NULL,
NULL,
- NULL) != kDNSServiceErr_NoError) {
+ NULL)) != kDNSServiceErr_NoError) {
g_set_error (error,
DMAP_MDNS_PUBLISHER_ERROR,
DMAP_MDNS_PUBLISHER_ERROR_FAILED,
- "%s",
- "Error publishing via DNSSD");
+ "%s: %d",
+ "Error publishing via DNSSD", dns_err);
+ if (dns_err == kDNSServiceErr_NameConflict) {
+ g_signal_emit (publisher, signals[NAME_COLLISION], 0, publisher->priv->name);
+ }
return FALSE;
}
- publisher_set_name_internal (publisher, name, NULL);
- publisher_set_port_internal (publisher, port, NULL);
- publisher_set_type_of_service_internal (publisher, type_of_service, NULL);
- publisher_set_password_required_internal (publisher, password_required, NULL);
+ g_signal_emit (publisher, signals[PUBLISHED], 0, publisher->priv->name);
return TRUE;
}
@@ -223,6 +241,27 @@ dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
object_class->get_property = dmap_mdns_publisher_get_property;
object_class->set_property = dmap_mdns_publisher_set_property;
+ signals [PUBLISHED] =
+ g_signal_new ("published",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass, published),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+ signals [NAME_COLLISION] =
+ g_signal_new ("name-collision",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass, name_collision),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+
g_type_class_add_private (klass, sizeof (DmapMdnsPublisherPrivate));
}
diff --git a/libdmapsharing/dmap.h b/libdmapsharing/dmap.h
index 4d445e5..245af44 100644
--- a/libdmapsharing/dmap.h
+++ b/libdmapsharing/dmap.h
@@ -9,6 +9,7 @@
#include <libdmapsharing/dmap-container-record.h>
#include <libdmapsharing/dmap-db.h>
#include <libdmapsharing/dmap-mdns-browser.h>
+#include <libdmapsharing/dmap-mdns-publisher.h>
#include <libdmapsharing/dmap-record.h>
#include <libdmapsharing/dmap-record-factory.h>
#include <libdmapsharing/dmap-share.h>
diff --git a/libdmapsharing/g-gst-mp3-input-stream.c b/libdmapsharing/g-gst-mp3-input-stream.c
index afe9d3b..24ed920 100644
--- a/libdmapsharing/g-gst-mp3-input-stream.c
+++ b/libdmapsharing/g-gst-mp3-input-stream.c
@@ -78,10 +78,19 @@ GInputStream* g_gst_mp3_input_stream_new (GInputStream *src_stream)
stream->priv->pipeline = gst_pipeline_new ("pipeline");
stream->priv->src = gst_element_factory_make ("giostreamsrc", "src");
+ g_assert (GST_IS_ELEMENT (stream->priv->src));
+
stream->priv->decode = gst_element_factory_make ("decodebin", "decode");
+ g_assert (GST_IS_ELEMENT (stream->priv->decode));
+
stream->priv->convert = gst_element_factory_make ("audioconvert", "convert");
+ g_assert (GST_IS_ELEMENT (stream->priv->convert));
+
stream->priv->encode = gst_element_factory_make ("lame", "encode");
+ g_assert (GST_IS_ELEMENT (stream->priv->encode));
+
stream->priv->sink = gst_element_factory_make ("appsink", "sink");
+ g_assert (GST_IS_ELEMENT (stream->priv->sink));
gst_bin_add_many (GST_BIN (stream->priv->pipeline),
stream->priv->src,
diff --git a/libdmapsharing/g-gst-wav-input-stream.c b/libdmapsharing/g-gst-wav-input-stream.c
index c910ad8..25a6727 100644
--- a/libdmapsharing/g-gst-wav-input-stream.c
+++ b/libdmapsharing/g-gst-wav-input-stream.c
@@ -82,8 +82,14 @@ GInputStream* g_gst_wav_input_stream_new (GInputStream *src_stream)
stream->priv->pipeline = gst_pipeline_new ("pipeline");
stream->priv->src = gst_element_factory_make ("giostreamsrc", "src");
+ g_assert (GST_IS_ELEMENT (stream->priv->src));
+
stream->priv->decode = gst_element_factory_make ("decodebin", "decode");
+ g_assert (GST_IS_ELEMENT (stream->priv->decode));
+
stream->priv->convert = gst_element_factory_make ("audioconvert", "convert");
+ g_assert (GST_IS_ELEMENT (stream->priv->convert));
+
/* Roku clients support a subset of the WAV format. */
stream->priv->filter = gst_caps_new_simple ("audio/x-raw-int",
"channels", G_TYPE_INT, 2,
@@ -91,7 +97,10 @@ GInputStream* g_gst_wav_input_stream_new (GInputStream *src_stream)
"depth", G_TYPE_INT, 16,
NULL);
stream->priv->encode = gst_element_factory_make ("wavenc", "encode");
+ g_assert (GST_IS_ELEMENT (stream->priv->encode));
+
stream->priv->sink = gst_element_factory_make ("appsink", "sink");
+ g_assert (GST_IS_ELEMENT (stream->priv->sink));
gst_bin_add_many (GST_BIN (stream->priv->pipeline),
stream->priv->src,
diff --git a/tests/test-daap-record-factory.h b/tests/test-daap-record-factory.h
index 520fc94..28d0492 100644
--- a/tests/test-daap-record-factory.h
+++ b/tests/test-daap-record-factory.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DAAP_RECORD_FACTORY
#define __TEST_DAAP_RECORD_FACTORY
-#include <libdmapsharing/dmap-record-factory.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
diff --git a/tests/test-daap-record.c b/tests/test-daap-record.c
index 6c22e40..2b5c235 100644
--- a/tests/test-daap-record.c
+++ b/tests/test-daap-record.c
@@ -28,6 +28,7 @@ struct TestDAAPRecordPrivate {
char *location;
char *title;
char *format;
+ char *real_format;
char *album;
char *artist;
gulong bitrate;
@@ -72,24 +73,33 @@ test_daap_record_set_property (GObject *object,
switch (prop_id) {
case PROP_LOCATION:
- /* FIXME: should I free location first? */
+ g_free (record->priv->location);
record->priv->location = g_value_dup_string (value);
break;
case PROP_TITLE:
+ g_free (record->priv->title);
record->priv->title = g_value_dup_string (value);
break;
case PROP_ALBUM:
+ g_free (record->priv->album);
record->priv->album = g_value_dup_string (value);
break;
case PROP_ARTIST:
+ g_free (record->priv->artist);
record->priv->artist = g_value_dup_string (value);
break;
case PROP_GENRE:
+ g_free (record->priv->genre);
record->priv->genre = g_value_dup_string (value);
break;
case PROP_FORMAT:
+ g_free (record->priv->format);
record->priv->format = g_value_dup_string (value);
break;
+ case PROP_REAL_FORMAT:
+ g_free (record->priv->real_format);
+ record->priv->real_format = g_value_dup_string (value);
+ break;
case PROP_RATING:
record->priv->rating = g_value_get_int (value);
break;
diff --git a/tests/test-daap-record.h b/tests/test-daap-record.h
index 7f0e56c..62faa45 100644
--- a/tests/test-daap-record.h
+++ b/tests/test-daap-record.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DAAP_RECORD
#define __TEST_DAAP_RECORD
-#include <libdmapsharing/daap-record.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
diff --git a/tests/test-dmap-client.c b/tests/test-dmap-client.c
index 7196625..243f20b 100644
--- a/tests/test-dmap-client.c
+++ b/tests/test-dmap-client.c
@@ -21,14 +21,12 @@
#include <stdio.h>
#include <stdlib.h>
+#include <libdmapsharing/dmap.h>
+
#include "test-dmap-db.h"
#include "test-daap-record-factory.h"
#include "test-dpap-record-factory.h"
-#include <libdmapsharing/daap-connection.h>
-#include <libdmapsharing/dpap-connection.h>
-#include <libdmapsharing/dmap-mdns-browser.h>
-
enum {
DAAP,
DPAP
diff --git a/tests/test-dmap-container-db.h b/tests/test-dmap-container-db.h
index b505739..bb66a40 100644
--- a/tests/test-dmap-container-db.h
+++ b/tests/test-dmap-container-db.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DMAP_CONTAINER_DB
#define __TEST_DMAP_CONTAINER_DB
-#include <libdmapsharing/dmap-container-db.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
diff --git a/tests/test-dmap-container-record.c b/tests/test-dmap-container-record.c
index 316e406..287ea43 100644
--- a/tests/test-dmap-container-record.c
+++ b/tests/test-dmap-container-record.c
@@ -20,8 +20,46 @@
#include "test-dmap-container-record.h"
+enum {
+ PROP_0,
+ PROP_NAME
+};
+
static DMAPDb *entries = NULL;
+static void
+test_dmap_container_record_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ switch (prop_id) {
+ case PROP_NAME:
+ /* NOTE: do nothing; test name is always the same. */
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+test_dmap_container_record_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ switch (prop_id) {
+ case PROP_NAME:
+ g_value_set_string (value, "Test");
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+
gint
test_dmap_container_record_get_id (DMAPContainerRecord *record)
{
@@ -56,6 +94,12 @@ test_dmap_container_record_init (TestDMAPContainerRecord *record)
static void
test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->set_property = test_dmap_container_record_set_property;
+ gobject_class->get_property = test_dmap_container_record_get_property;
+
+ g_object_class_override_property (gobject_class, PROP_NAME, "name");
}
static void
diff --git a/tests/test-dmap-container-record.h b/tests/test-dmap-container-record.h
index b2bac8e..d5186ba 100644
--- a/tests/test-dmap-container-record.h
+++ b/tests/test-dmap-container-record.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DMAP_CONTAINER_RECORD
#define __TEST_DMAP_CONTAINER_RECORD
-#include <libdmapsharing/dmap-container-record.h>
+#include <libdmapsharing/dmap.h>
#include "test-dmap-db.h"
diff --git a/tests/test-dmap-db.h b/tests/test-dmap-db.h
index 1b0884e..258a3b3 100644
--- a/tests/test-dmap-db.h
+++ b/tests/test-dmap-db.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DMAP_DB
#define __TEST_DMAP_DB
-#include <libdmapsharing/dmap-db.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
diff --git a/tests/test-dmap-server.c b/tests/test-dmap-server.c
index d401b47..5b0b596 100644
--- a/tests/test-dmap-server.c
+++ b/tests/test-dmap-server.c
@@ -23,9 +23,7 @@
#include <string.h>
#include <glib.h>
-#include <libdmapsharing/dmap-mdns-browser.h>
-#include <libdmapsharing/daap-share.h>
-#include <libdmapsharing/dpap-share.h>
+#include <libdmapsharing/dmap.h>
#include "test-dmap-container-record.h"
#include "test-daap-record.h"
@@ -58,8 +56,11 @@ static void
create_share (guint conn_type)
{
char *name = dmap_sharing_default_share_name ();
- DMAPContainerRecord *dmap_container_record = DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
- DMAPContainerDb *dmap_container_db = DMAP_CONTAINER_DB (test_dmap_container_db_new (dmap_container_record));
+ DMAPContainerRecord *dmap_container_record = \
+ DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
+ DMAPContainerDb *dmap_container_db = \
+ DMAP_CONTAINER_DB (test_dmap_container_db_new
+ (dmap_container_record));
DMAPRecordFactory *factory;
DMAPRecord *record;
DMAPShare *share;
@@ -80,9 +81,17 @@ create_share (guint conn_type)
g_warning ("initialize DAAP sharing");
if (conn_type == DAAP) {
- share = DMAP_SHARE (daap_share_new (name, NULL, db, dmap_container_db, NULL));
+ share = DMAP_SHARE (daap_share_new (name,
+ NULL,
+ db,
+ dmap_container_db,
+ NULL));
} else {
- share = DMAP_SHARE (dpap_share_new (name, NULL, db, dmap_container_db, NULL));
+ share = DMAP_SHARE (dpap_share_new (name,
+ NULL,
+ db,
+ dmap_container_db,
+ NULL));
}
g_free (name);
diff --git a/tests/test-dpap-record-factory.h b/tests/test-dpap-record-factory.h
index 765eff0..3105017 100644
--- a/tests/test-dpap-record-factory.h
+++ b/tests/test-dpap-record-factory.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DPAP_RECORD_FACTORY
#define __TEST_DPAP_RECORD_FACTORY
-#include <libdmapsharing/dmap-record-factory.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
diff --git a/tests/test-dpap-record.c b/tests/test-dpap-record.c
index 3374e06..765de42 100644
--- a/tests/test-dpap-record.c
+++ b/tests/test-dpap-record.c
@@ -73,12 +73,15 @@ test_dpap_record_set_property (GObject *object,
record->priv->rating = g_value_get_int (value);
break;
case PROP_LOCATION:
+ g_free (record->priv->location);
record->priv->location = g_value_dup_string (value);
break;
case PROP_FILENAME:
+ g_free (record->priv->filename);
record->priv->filename = g_value_dup_string (value);
break;
case PROP_ASPECT_RATIO:
+ g_free (record->priv->aspectratio);
record->priv->aspectratio = g_value_dup_string (value);
break;
case PROP_PIXEL_HEIGHT:
@@ -87,9 +90,11 @@ test_dpap_record_set_property (GObject *object,
record->priv->pixelwidth = g_value_get_int (value);
break;
case PROP_FORMAT:
+ g_free (record->priv->format);
record->priv->format = g_value_dup_string (value);
break;
case PROP_COMMENTS:
+ g_free (record->priv->comments);
record->priv->comments = g_value_dup_string (value);
break;
default:
diff --git a/tests/test-dpap-record.h b/tests/test-dpap-record.h
index bc12038..7de58bb 100644
--- a/tests/test-dpap-record.h
+++ b/tests/test-dpap-record.h
@@ -21,7 +21,7 @@
#ifndef __TEST_DPAP_RECORD
#define __TEST_DPAP_RECORD
-#include <libdmapsharing/dpap-record.h>
+#include <libdmapsharing/dmap.h>
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]