summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2013-01-24 06:32:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2013-01-24 06:32:46 +0000
commite4a16f80dd6832df142e807e3d778dc0167b00cb (patch)
treedd73c2d6e8e73043ee7dcccceb721ef04965b611
parent50b8369a6b054a5587bb44383b1472be8698c5da (diff)
lets port pulse fix over to epulse.
SVN revision: 83202
-rw-r--r--serial.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/serial.c b/serial.c
index 2a6487f..ed3fc63 100644
--- a/serial.c
+++ b/serial.c
@@ -63,6 +63,7 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
63 const char *monitor_source_name, *driver; 63 const char *monitor_source_name, *driver;
64 Eina_Hash *props = NULL; 64 Eina_Hash *props = NULL;
65 unsigned int x; 65 unsigned int x;
66 Pulse_Sink_Port_Info *pi = NULL;
66 67
67 monitor_source_name = driver = NULL; 68 monitor_source_name = driver = NULL;
68 EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &x), error); 69 EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &x), error);
@@ -98,13 +99,12 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
98 99
99 for (x = 0; x < n_ports; x++) 100 for (x = 0; x < n_ports; x++)
100 { 101 {
101 Pulse_Sink_Port_Info *pi;
102
103 pi = calloc(1, sizeof(Pulse_Sink_Port_Info)); 102 pi = calloc(1, sizeof(Pulse_Sink_Port_Info));
104 sink->ports = eina_list_append(sink->ports, pi);
105 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->name), error); 103 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->name), error);
106 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->description), error); 104 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &pi->description), error);
107 EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &pi->priority), error); 105 EINA_SAFETY_ON_FALSE_GOTO(untag_uint32(tag, &pi->priority), error);
106 sink->ports = eina_list_append(sink->ports, pi);
107 pi = NULL;
108 } 108 }
109 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &sink->active_port), error); 109 EINA_SAFETY_ON_FALSE_GOTO(untag_string(tag, &sink->active_port), error);
110 if (exist) 110 if (exist)
@@ -119,6 +119,13 @@ deserialize_sink(Pulse *conn __UNUSED__, Pulse_Tag *tag, Eina_Bool source)
119 } 119 }
120 return sink; 120 return sink;
121error: 121error:
122 if (pi)
123 {
124 if (pi->name) eina_stringshare_del(pi->name);
125 if (pi->description) eina_stringshare_del(pi->description);
126 free(pi);
127 pi = NULL;
128 }
122 pulse_sink_free(sink); 129 pulse_sink_free(sink);
123 eina_hash_free(props); 130 eina_hash_free(props);
124 return NULL; 131 return NULL;