native_connection_unlink(c);
}
+#ifdef __TIZEN__
+#define CHECK_VALIDITY(pstream, expression, tag, error) do { \
+if (!(expression)) { \
+ pa_log_error("%s", #expression);\
+ pa_pstream_send_error((pstream), (tag), (error)); \
+ return; \
+} \
+} while(0);
+
+#define CHECK_VALIDITY_GOTO(pstream, expression, tag, error, label) do { \
+if (!(expression)) { \
+ pa_log_error("%s", #expression);\
+ pa_pstream_send_error((pstream), (tag), (error)); \
+ goto label; \
+} \
+} while(0);
+#else /* __TIZEN__ */
#define CHECK_VALIDITY(pstream, expression, tag, error) do { \
if (!(expression)) { \
pa_pstream_send_error((pstream), (tag), (error)); \
goto label; \
} \
} while(0);
+#endif /* __TIZEN__ */
static pa_tagstruct *reply_new(uint32_t tag) {
pa_tagstruct *reply;
goto finish;
}
+#ifdef __TIZEN__
+ pa_log_info("name:%s, sink_index:%u, sink_name:%s, corked:%u, syncid:%u",
+ name, sink_index, sink_name, corked, syncid);
+#endif
+
CHECK_VALIDITY_GOTO(c->pstream, c->authorized, tag, PA_ERR_ACCESS, finish);
CHECK_VALIDITY_GOTO(c->pstream, !sink_name || pa_namereg_is_valid_name_or_wildcard(sink_name, PA_NAMEREG_SINK), tag, PA_ERR_INVALID, finish);
CHECK_VALIDITY_GOTO(c->pstream, sink_index == PA_INVALID_INDEX || !sink_name, tag, PA_ERR_INVALID, finish);
if (sink_index != PA_INVALID_INDEX) {
if (!(sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index))) {
+#ifdef __TIZEN__
+ pa_log_warn("[NOENTITY] ingoring given sink index %u ...", sink_index);
+#else
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
goto finish;
+#endif
}
} else if (sink_name) {
if (!(sink = pa_namereg_get(c->protocol->core, sink_name, PA_NAMEREG_SINK))) {
+#ifdef __TIZEN__
+ pa_log_warn("[NOENTITY] ingoring given sink name %s ...", sink_name);
+#else
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
goto finish;
+#endif
}
}
goto finish;
}
+#ifdef __TIZEN__
+ pa_log_info("name:%s, source_index:%u, source_name:%s, corked:%u",
+ name, source_index, source_name, corked);
+#endif
+
CHECK_VALIDITY_GOTO(c->pstream, c->authorized, tag, PA_ERR_ACCESS, finish);
CHECK_VALIDITY_GOTO(c->pstream, !source_name || pa_namereg_is_valid_name_or_wildcard(source_name, PA_NAMEREG_SOURCE), tag, PA_ERR_INVALID, finish);
CHECK_VALIDITY_GOTO(c->pstream, source_index == PA_INVALID_INDEX || !source_name, tag, PA_ERR_INVALID, finish);
if (source_index != PA_INVALID_INDEX) {
if (!(source = pa_idxset_get_by_index(c->protocol->core->sources, source_index))) {
+#ifdef __TIZEN__
+ pa_log_warn("[NOENTITY] ingoring given source index %u ...", source_index);
+#else
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
goto finish;
+#endif
}
} else if (source_name) {
if (!(source = pa_namereg_get(c->protocol->core, source_name, PA_NAMEREG_SOURCE))) {
+#ifdef __TIZEN__
+ pa_log_warn("[NOENTITY] ingoring given source name %s ...", source_name);
+#else
pa_pstream_send_error(c->pstream, tag, PA_ERR_NOENTITY);
goto finish;
+#endif
}
}