In preparation for having sessiond main() handle the error.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
/*
* Init UST app hash table.
*/
-void ust_app_ht_alloc(void)
+int ust_app_ht_alloc(void)
{
ust_app_ht = lttng_ht_new(0, LTTNG_HT_TYPE_ULONG);
+ if (!ust_app_ht) {
+ return -1;
+ }
ust_app_ht_by_sock = lttng_ht_new(0, LTTNG_HT_TYPE_ULONG);
+ if (!ust_app_ht_by_sock) {
+ return -1;
+ }
ust_app_ht_by_notify_sock = lttng_ht_new(0, LTTNG_HT_TYPE_ULONG);
+ if (!ust_app_ht_by_notify_sock) {
+ return -1;
+ }
+ return 0;
}
/*
void ust_app_global_update(struct ltt_ust_session *usess, int sock);
void ust_app_clean_list(void);
-void ust_app_ht_alloc(void);
+int ust_app_ht_alloc(void);
struct ust_app *ust_app_find_by_pid(pid_t pid);
int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate);
struct ust_app_stream *ust_app_alloc_stream(void);