mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 02:40:42 +01:00
prevent getnameinfo() from being cancelled
... but removed the mutex, as the problem seems to be in cancel processing, so the mutex is no longer necessary
This commit is contained in:
parent
5a1a73b432
commit
e30fe2842e
@ -685,11 +685,14 @@ mygetnameinfo(const struct sockaddr *sa, socklen_t salen,
|
||||
char *serv, size_t servlen, int flags)
|
||||
{
|
||||
static pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
|
||||
int iCancelStateSave;
|
||||
int i;
|
||||
|
||||
pthread_mutex_lock(&mut);
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
|
||||
//pthread_mutex_lock(&mut);
|
||||
i = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
|
||||
pthread_mutex_unlock(&mut);
|
||||
//pthread_mutex_unlock(&mut);
|
||||
pthread_setcancelstate(iCancelStateSave, NULL);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user