2010-12-01 16:26:48 +01:00
|
|
|
#include <stdio.h>
|
2010-12-03 22:22:58 +01:00
|
|
|
#include <string.h>
|
2010-12-01 16:26:48 +01:00
|
|
|
#include <config.h>
|
2010-12-03 22:22:58 +01:00
|
|
|
#include <stdlib.h>
|
2010-12-01 16:26:48 +01:00
|
|
|
|
|
|
|
void _id_handler(char *id) {
|
2010-12-03 22:22:58 +01:00
|
|
|
long newid;
|
2010-12-01 16:26:48 +01:00
|
|
|
|
2010-12-03 22:22:58 +01:00
|
|
|
newid = atoi(id+3);
|
|
|
|
if (strlen(id) < 3) {
|
|
|
|
printf("Current id: %u\n", sysconfig.id);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
printf("Setting new id %lu\n", newid);
|
2010-12-01 16:26:48 +01:00
|
|
|
sysconfig.id = newid;
|
|
|
|
if (!config_save()) {
|
|
|
|
puts("ERROR setting new id");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|