Storage *storage = new StorageN11(this, id, properties, p_maxminSystem,
Bread, Bwrite, Bconnection, type_id, (char *)content_name,
xbt_strdup(content_type), storage_type->size, (char *) attach);
- surf_callback_emit(storageCreatedCallbacks, storage);
+ storageCreatedCallbacks(storage);
xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tproperties '%p'\n\t\tBread '%f'\n",
file->mount = xbt_strdup(mount);
file->current_position = 0;
- StorageAction *action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN);
+ StorageAction *action = new StorageN11Action(getModel(), 0, isOff(), this, OPEN);
action->p_file = file;
return action;
free(fd->name);
free(fd->mount);
xbt_free(fd);
- StorageAction *action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, CLOSE);
+ StorageAction *action = new StorageN11Action(getModel(), 0, isOff(), this, CLOSE);
return action;
}
else
fd->current_position += size;
- StorageAction *action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, READ);
+ StorageAction *action = new StorageN11Action(getModel(), size, isOff(), this, READ);
return action;
}
char *filename = fd->name;
XBT_DEBUG("\tWrite file '%s' size '%llu/%llu'",filename,size,fd->size);
- StorageAction *action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, WRITE);
+ StorageAction *action = new StorageN11Action(getModel(), size, isOff(), this, WRITE);
action->p_file = fd;
/* Substract the part of the file that might disappear from the used sized on
* the storage element */