From 6d99f894167d334e2ba45799e6b5c352637074a5 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 9 Aug 2014 02:08:05 +1000 Subject: [PATCH] Allow workernames with either . or _ separators --- src/stratifier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index fedc73e4..ed49e38c 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1220,10 +1220,11 @@ static json_t *parse_subscribe(int client_id, json_t *params_val) * user or creates a new one. */ static user_instance_t *authorise_user(const char *workername) { - char *fullname = strdupa(workername); - char *username = strsep(&fullname, "."); + char *username = strdupa(workername); user_instance_t *instance; + username = strsep(&username, "."); + username = strsep(&username, "_"); if (strlen(username) > 127) username[127] = '\0';