const int buffer_size = 1024;
-const char *default_confguration_file = "/etc/breezed.conf";
+const char *default_configuration_file = "/etc/breezed.conf";
// The time period to check the temperature.
const int polling_delay = 5;
int file_fan_fd;
-int nb_temperature_thresholds = 0;
+int nb_temperature_thresholds;
int *temperature_thresholds = 0;
int nb_file_thermal = 0;
exit(1);
}
+ nb_temperature_thresholds = 1;
+
char *s;
s = definition;
while(s) {
temperature_thresholds = new int[nb_temperature_thresholds];
+ temperature_thresholds[0] = -1;
+
s = definition;
- int k = 0;
+ int k = 1;
while(s) {
s = next_word(token, s, buffer_size);
temperature_thresholds[k] = atoi(token);
}
k++;
}
-
- temperature_thresholds[0] = -1;
}
//////////////////////////////////////////////////////////////////////
char buffer[buffer_size], token[buffer_size];
- configuration_file = new char[strlen(default_confguration_file) + 1];
- strcpy(configuration_file, default_confguration_file);
+ configuration_file = new char[strlen(default_configuration_file) + 1];
+ strcpy(configuration_file, default_configuration_file);
int i = 1;
while(i < argc) {