This commit is contained in:
Shahram Najm 2016-10-03 16:39:45 +01:00
parent c7611a90f7
commit ff6923937a
1 changed files with 7 additions and 7 deletions

View File

@ -114,13 +114,13 @@ int grib_create_accessor(grib_section* p, grib_action* a, grib_loader* h)
while(c)
{
if(c->create_accessor) {
int ret;
GRIB_MUTEX_INIT_ONCE(&once,&init_mutex);
GRIB_MUTEX_LOCK(&mutex1);
int ret;
GRIB_MUTEX_INIT_ONCE(&once,&init_mutex);
GRIB_MUTEX_LOCK(&mutex1);
ret=c->create_accessor(p, a, h);
GRIB_MUTEX_UNLOCK(&mutex1);
GRIB_MUTEX_UNLOCK(&mutex1);
return ret;
}
}
c = c->super ? *(c->super) : NULL;
}
fprintf(stderr,"Cannot create accessor %s %s\n",a->name,a->cclass->name);
@ -132,8 +132,8 @@ int grib_action_notify_change( grib_action* a, grib_accessor *observer, grib_acc
{
grib_action_class *c = a->cclass;
GRIB_MUTEX_INIT_ONCE(&once,&init_mutex)
GRIB_MUTEX_LOCK(&mutex1)
GRIB_MUTEX_INIT_ONCE(&once,&init_mutex);
GRIB_MUTEX_LOCK(&mutex1);
init(c);
while(c)