* SOFTWARE.
*/
+#include <babeltrace/compat/time-internal.h>
+#include <babeltrace/compat/utc-internal.h>
#include <babeltrace/graph/notification-iterator.h>
#include <babeltrace/graph/private-notification-iterator.h>
#include <babeltrace/graph/notification.h>
#include <babeltrace/graph/private-port.h>
#include <babeltrace/graph/private-connection.h>
#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/connection.h>
#include <babeltrace/ctf-ir/event.h>
#include <babeltrace/ctf-ir/stream.h>
#include <babeltrace/ctf-ir/stream-class.h>
enum bt_notification_iterator_status ret =
BT_NOTIFICATION_ITERATOR_STATUS_OK;
enum bt_notification_iterator_status it_ret;
+ enum bt_connection_status conn_status;
struct bt_private_port *input_port = NULL;
struct bt_private_connection *connection = NULL;
struct bt_private_component *component =
connection = bt_private_port_get_private_connection(input_port);
assert(connection);
- it_data->input_iterator =
- bt_private_connection_create_notification_iterator(connection,
- notif_types);
- if (!it_data->input_iterator) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM;
+ conn_status = bt_private_connection_create_notification_iterator(connection,
+ notif_types, &it_data->input_iterator);
+ if (conn_status != BT_CONNECTION_STATUS_OK) {
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
goto end;
}
if (bound->lazy_values.gmt) {
/* Get day, month, year. */
- if (!gmtime_r(&timeval, &tm)) {
- printf_error("Failure in gmtime_r()");
+ if (!bt_gmtime_r(&timeval, &tm)) {
+ printf_error("Failure in bt_gmtime_r()");
goto error;
}
tm.tm_sec = bound->lazy_values.ss;
tm.tm_min = bound->lazy_values.mm;
tm.tm_hour = bound->lazy_values.hh;
- timeval = timegm(&tm);
+ timeval = bt_timegm(&tm);
if (timeval < 0) {
- printf_error("Failure in timegm(), incorrectly formatted %s timestamp",
+ printf_error("Failure in bt_timegm(), incorrectly formatted %s timestamp",
name);
goto error;
}
} else {
/* Get day, month, year. */
- if (!localtime_r(&timeval, &tm)) {
- printf_error("Failure in localtime_r()");
+ if (!bt_localtime_r(&timeval, &tm)) {
+ printf_error("Failure in bt_localtime_r()");
goto error;
}
tm.tm_sec = bound->lazy_values.ss;