Skip to content

Commit dfa3a02

Browse files
committed
UniRec output: create libtrap service (UNIX) socket with name of plugin
1 parent 6195fcc commit dfa3a02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extra_plugins/output/unirec/src/unirecplugin.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ core_initialize_inter(ipx_ctx_t *ctx, struct conf_unirec *cfg, const map_t *map)
172172
// Create a TRAP interface
173173
const char *ifc_spec = cfg->params->trap_ifc_spec;
174174
IPX_CTX_INFO(ctx, "Initialization of TRAP with IFCSPEC: '%s'.", ifc_spec);
175-
cfg->trap_ctx = trap_ctx_init3(PLUGIN_TRAP_NAME, PLUGIN_TRAP_DSC, 0, 1, ifc_spec, NULL);
175+
176+
const char *instance_name = ipx_ctx_name_get(ctx);
177+
cfg->trap_ctx = trap_ctx_init3(PLUGIN_TRAP_NAME, PLUGIN_TRAP_DSC, 0, 1, ifc_spec, instance_name);
176178
if (!cfg->trap_ctx) {
177179
IPX_CTX_ERROR(ctx, "Failed to initialize TRAP (%s:%d)", __FILE__, __LINE__);
178180
return IPX_ERR_NOMEM;

0 commit comments

Comments
 (0)