py_res = PyObject_CallFunction(py_callable, "(OiOi)",
py_component_ptr, component_class_type, py_port_ptr, port_type);
if (!py_res) {
- loge_exception();
+ loge_exception("Graph's port added listener (Python)");
PyErr_Clear();
status = __BT_FUNC_STATUS_ERROR;
goto end;
PyObject *py_listener_id = NULL;
int listener_id;
bt_graph_add_listener_status status;
+ const char * const module_name =
+ "graph_add_port_added_listener() (Python)";
BT_ASSERT(graph);
BT_ASSERT(py_callable);
*/
py_listener_ids = PyTuple_New(4);
if (!py_listener_ids) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyTuple.");
goto error;
}
graph, source_component_output_port_added_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_source_component_output_port_added_listener has
+ * already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, filter_component_input_port_added_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_filter_component_input_port_added_listener has
+ * already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, filter_component_output_port_added_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_filter_component_output_port_added_listener has
+ * already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, sink_component_input_port_added_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_sink_component_input_port_added_listener has
+ * already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
py_downstream_component_ptr, downstream_component_class_type,
py_downstream_port_ptr);
if (!py_res) {
- loge_exception();
+ loge_exception("Graph's port connected listener (Python)");
PyErr_Clear();
status = __BT_FUNC_STATUS_ERROR;
goto end;
PyObject *py_listener_id = NULL;
int listener_id;
bt_graph_add_listener_status status;
+ const char * const module_name =
+ "graph_add_ports_connected_listener() (Python)";
BT_ASSERT(graph);
BT_ASSERT(py_callable);
* return all of their ids. */
py_listener_ids = PyTuple_New(4);
if (!py_listener_ids) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyTuple.");
goto error;
}
graph, source_filter_component_ports_connected_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_source_filter_component_ports_connected_listener
+ * has already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, source_sink_component_ports_connected_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_source_sink_component_ports_connected_listener
+ * has already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, filter_filter_component_ports_connected_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_filter_filter_component_ports_connected_listener
+ * has already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}
graph, filter_sink_component_ports_connected_listener,
graph_listener_removed, py_callable, &listener_id);
if (status != __BT_FUNC_STATUS_OK) {
+ /*
+ * bt_graph_add_filter_sink_component_ports_connected_listener
+ * has already logged/appended an error cause.
+ */
goto error;
}
py_listener_id = PyLong_FromLong(listener_id);
if (!py_listener_id) {
+ BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
+ "Failed to allocate one PyLong.");
goto error;
}