rpmfunctions.c: add mutex around rpmEVRparse
This commit is contained in:
parent
6524044cb9
commit
9af956da14
@ -69,8 +69,10 @@ unsigned int checkVersionWithFlags(const char* cmp1, uint_32 flags, const char*
|
||||
struct EVR_s evr1, evr2;
|
||||
int vercmp = 0;
|
||||
|
||||
sem_wait(&rpm_mutex);
|
||||
rpmEVRparse(cmp1, &evr1);
|
||||
rpmEVRparse(cmp2, &evr2);
|
||||
sem_post(&rpm_mutex);
|
||||
|
||||
if (strlen(evr1.F[RPMEVR_E]) && strlen(evr2.F[RPMEVR_E])) vercmp=rpmvercmp(evr1.F[RPMEVR_E], evr2.F[RPMEVR_E]);
|
||||
else if (strlen(evr2.F[RPMEVR_E])) vercmp = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user