Fix segfaults

This commit is contained in:
Jeremy Lakeman 2012-11-12 10:38:24 +10:30
parent c79c5d8968
commit f6ed8f1562
2 changed files with 2 additions and 2 deletions

View File

@ -103,6 +103,7 @@ static void directory_update(struct sched_ent *alarm){
if (subscriber_is_reachable(directory_service) != REACHABLE_NONE){
directory_send_keyring(directory_service);
unschedule(alarm);
alarm->alarm = gettime_ms() + DIRECTORY_UPDATE_INTERVAL;
alarm->deadline = alarm->alarm + 10000;
schedule(alarm);
@ -112,7 +113,6 @@ static void directory_update(struct sched_ent *alarm){
}
int directory_service_init(){
unschedule(&directory_alarm);
directory_update(&directory_alarm);
return 0;
}

View File

@ -14,7 +14,7 @@ struct item{
time_ms_t expires;
};
struct item *root;
struct item *root=NULL;
static struct item *create_item(const char *key){
struct item *ret=calloc(1,sizeof(struct item));