EDG_WLL_PARAM_LEVEL, /**< logging level */
EDG_WLL_PARAM_DESTINATION, /**< logging destination host */
EDG_WLL_PARAM_DESTINATION_PORT, /**< logging destination port */
+ EDG_WLL_PARAM_USER_LBPROXY, /**< user credentials when logging to L&B Proxy */
EDG_WLL_PARAM_LOG_TIMEOUT, /**< logging timeout (asynchronous) */
EDG_WLL_PARAM_LOG_SYNC_TIMEOUT, /**< logging timeout (synchronous) */
EDG_WLL_PARAM_QUERY_SERVER, /**< default server name to query */
}
/* format the DG.USER string */
/* XXX: put user credentials here probably from context */
- name_esc = edg_wll_LogEscape("User credentials should go here");
+ name_esc = edg_wll_LogEscape(context->p_user_lbproxy);
if (asprintf(&dguser,"DG.USER=\"%s\" ",name_esc) == -1) {
edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventMasterProxy(): asprintf() error");
goto edg_wll_logeventmasterproxy_end;
edg_wll_IncSequenceCode(context);
}
/* XXX: add user credentials somewhere - to context? */
+ edg_wll_SetParamString(context, EDG_WLL_PARAM_USER_LBPROXY, user);
return edg_wll_Error(context,NULL,NULL);
}
enum edg_wll_Level p_level;
char *p_destination;
int p_dest_port;
+ char *p_user_lbproxy;
struct timeval p_log_timeout,p_sync_timeout,p_query_timeout, p_notif_timeout, p_tmp_timeout;
char *p_query_server;
int p_query_server_port;
if (ctx->p_host) free(ctx->p_host);
if (ctx->p_instance) free(ctx->p_instance);
if (ctx->p_destination) free(ctx->p_destination);
+ if (ctx->p_user_lbproxy) free(ctx->p_user_lbproxy);
if (ctx->p_query_server) free(ctx->p_query_server);
if (ctx->p_notif_server) free(ctx->p_notif_server);
if (ctx->p_proxy_filename) free(ctx->p_proxy_filename);
free(ctx->p_destination);
ctx->p_destination = val ? strdup(val) : extract_host(param,EDG_WLL_LOG_HOST_DEFAULT);
break;
+ case EDG_WLL_PARAM_USER_LBPROXY:
+ free(ctx->p_user_lbproxy);
+ ctx->p_user_lbproxy = val ? strdup(val) : NULL;
+ break;
case EDG_WLL_PARAM_QUERY_SERVER:
free(ctx->p_query_server);
ctx->p_query_server = val ? strdup(val) : extract_host(param,NULL);
case EDG_WLL_PARAM_HOST:
case EDG_WLL_PARAM_INSTANCE:
case EDG_WLL_PARAM_DESTINATION:
+ case EDG_WLL_PARAM_USER_LBPROXY:
case EDG_WLL_PARAM_QUERY_SERVER:
case EDG_WLL_PARAM_NOTIF_SERVER:
case EDG_WLL_PARAM_QUERY_SERVER_OVERRIDE:
p_string = va_arg(ap, char **);
*p_string = estrdup(ctx->p_destination);
break;
+ case EDG_WLL_PARAM_USER_LBPROXY:
+ p_string = va_arg(ap, char **);
+ *p_string = estrdup(ctx->p_user_lbproxy);
+ break;
case EDG_WLL_PARAM_QUERY_SERVER:
p_string = va_arg(ap, char **);
*p_string = estrdup(ctx->p_query_server);