for (npref = 0; npref<totpref; npref++)
ctx->msg_prefixes[npref]=strdup(msg_prefixes[npref]);
- for (totpref = 0; msg_brokers[totpref]; totpref++);
+ for (totpref = 0; msg_brokers && msg_brokers[totpref]; totpref++);
ctx->msg_brokers = (char**) calloc(sizeof(char*), totpref);
for (npref = 0; npref<totpref; npref++)
ctx->msg_brokers[npref]=strdup(msg_brokers[npref]);
if (edg_wll_WSDLOutput(ctx, &message, filename))
ret = HTTP_INTERNAL;
free(filename);
+ /* GET /?version */
} else if (strncmp(requestPTR, "/?version", strlen("/?version")) == 0) {
asprintf(&message, "%s", VERSION);
+ /* GET /?configuration*/
+ } else if (strncmp(requestPTR, "/?configuration", strlen("/?configuration")) == 0) {
+ // also browser-readable HTML version here?
+ edg_wll_ConfigurationToText(ctx, &message);
/* GET [something else]: not understood */
} else ret = HTTP_BADREQ;
free(requestPTR); requestPTR = NULL;
return 0;
}
+int edg_wll_ConfigurationToText(edg_wll_Context ctx, char **message){
+ char *a = NULL, *b;
+ int pomL = 0;
+ b = strdup("");
+ TR("msg_brokers", "%s", ctx->msg_brokers);
+ TR("msg_prefixes", "%s", ctx->msg_prefixes);
+
+ *message = b;
+
+ return 0;
+}
+
char *edg_wll_ErrorToText(edg_wll_Context ctx,int code)
{
char *out,*et,*ed;