static int oilsAuthInitUsernameHandler(
osrfMethodContext* ctx, const char* username, const char* nonce) {
+ osrfLogInfo(OSRF_LOG_MARK,
+ "User logging in with username %s", username);
+
jsonObject* resp = NULL; // free
jsonObject* user_obj = oilsUtilsFetchUserByUsername(username); // free
static int oilsAuthInitBarcodeHandler(
osrfMethodContext* ctx, const char* barcode, const char* nonce) {
+ osrfLogInfo(OSRF_LOG_MARK,
+ "User logging in with barcode %s", barcode);
+
jsonObject* resp = NULL; // free
jsonObject* user_obj = oilsUtilsFetchUserByBarcode(barcode); // free
if (!bc_regex) {
// if no regex is set, assume any identifier starting
// with a number is a barcode.
- bc_regex = strdup("^\\d"); // dupe for later free'ing
+ bc_regex = strdup("^[[:digit:]]"); // dupe for later free'ing
}
regex_t regex;
}
}
+ regfree(®ex);
free(bc_regex);
return is_barcode;
}
ctx->method->name);
}
+ osrfLogInfo(OSRF_LOG_MARK,
+ "Patron completing authentication with identifer %s", identifier);
/* Use __FILE__, harmless_line_number for creating
* OILS_EVENT_AUTH_FAILED events (instead of OSRF_LOG_MARK) to avoid