projects
/
radsecproxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better logging, fixed bug with crash when removing client
[radsecproxy.git]
/
radsecproxy.c
diff --git
a/radsecproxy.c
b/radsecproxy.c
index
2201af9
..
5775f0c
100644
(file)
--- a/
radsecproxy.c
+++ b/
radsecproxy.c
@@
-585,20
+585,22
@@
struct client *addclient(struct clsrvconf *conf, uint8_t lock) {
}
void removeclient(struct client *client) {
}
void removeclient(struct client *client) {
+ struct clsrvconf *conf;
+
if (!client)
return;
if (!client)
return;
-
- pthread_mutex_lock(c
lient->c
onf->lock);
- if (c
lient->c
onf->clients) {
+ conf = client->conf;
+ pthread_mutex_lock(conf->lock);
+ if (conf->clients) {
pthread_mutex_lock(&client->lock);
removequeue(client->replyq);
pthread_mutex_lock(&client->lock);
removequeue(client->replyq);
- list_removedata(c
lient->c
onf->clients, client);
+ list_removedata(conf->clients, client);
pthread_mutex_unlock(&client->lock);
pthread_mutex_destroy(&client->lock);
free(client->addr);
free(client);
}
pthread_mutex_unlock(&client->lock);
pthread_mutex_destroy(&client->lock);
free(client->addr);
free(client);
}
- pthread_mutex_unlock(c
lient->c
onf->lock);
+ pthread_mutex_unlock(conf->lock);
}
void removeclientrqs(struct client *client) {
}
void removeclientrqs(struct client *client) {