I have a problem: I''m able to turn on the lights in my program, but I can''t turn them off

When the user press a key (0..7, I have 8 lights) a function checks the key''s number and call TurnLight() with the right parameter.
Do you think it''s wrong? What should I do to be able to turn on and off the lights in a program?
Thank you for your help

void TurnLight(int number) {
GLenum L[] = {GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7};
if(LC.LightVector[number].present) { //it exists
if(LC.LightVector[number].activated) { //it''s activated
glDisable(L[number]);
LC.LightVector[number].activated = false;
} else { //it''s deactivated
glLightfv(L[number], GL_AMBIENT, LC.LightVector[number].a);
glLightfv(L[number], GL_DIFFUSE, LC.LightVector[number].d);
glLightfv(L[number], GL_SPECULAR, LC.LightVector[number].s);
glLightfv(L[number], GL_POSITION, LC.LightVector[number].p);
glEnable(L[number]);
}
glutPostRedisplay();
}
}