search for: thread_rwlock_rlock

Displaying 2 results from an estimated 2 matches for "thread_rwlock_rlock".

Did you mean: pthread_rwlock_rdlock
2004 Aug 06
4
No Duplicate Users - Patch
...c auth_result htpasswd_auth(auth_t *auth, source_t *source, char *username, char *password) { htpasswd_auth_state *state = auth->state; - FILE *passwdfile = fopen(state->filename, "rb"); + FILE *passwdfile = NULL; char line[MAX_LINE_LEN]; char *sep; thread_rwlock_rlock(&state->file_rwlock); + if (!state->allow_duplicate_users) { + if (auth_is_listener_connected(source, username)) { + return AUTH_FAILED; + } + } + passwdfile = fopen(state->filename, "rb"); if(passwdfile == NULL) { WARN2(&quot...
2004 Aug 06
0
No Duplicate Users - Patch
...ies wether or not the same username can > connect to a mountpoint more than once. This is pretty much a required > feature for any decent use of the listener authentication capabilities of > icecast. > > thoughts ? comments ? This is good, but I have one comment... > > thread_rwlock_rlock(&state->file_rwlock); > + if (!state->allow_duplicate_users) { > + if (auth_is_listener_connected(source, username)) { > + return AUTH_FAILED; Currently, we only have a generic 'AUTH_FAILED' here. I'd like to see an AUTH_FORBIDDEN (or some other...