Fix semaphore updating on netbsd/evbarm
This commit is contained in:
parent
653f116660
commit
7dba74f514
@ -833,13 +833,13 @@ void bwave_upload_reply() {
|
||||
|
||||
if (netmail == 1) {
|
||||
if (conf.netmail_sem != NULL) {
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
}
|
||||
if (echomail == 1) {
|
||||
if (conf.echomail_sem != NULL) {
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
}
|
||||
|
@ -1846,12 +1846,12 @@ int read_message(struct user_record *user, struct msg_headers *msghs, int mailno
|
||||
} else {
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NETMAIL_AREA) {
|
||||
if (conf.netmail_sem != NULL) {
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
} else if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_ECHOMAIL_AREA || conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NEWSGROUP_AREA) {
|
||||
if (conf.echomail_sem != NULL) {
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
}
|
||||
@ -2252,12 +2252,12 @@ void post_message(struct user_record *user) {
|
||||
} else {
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NETMAIL_AREA) {
|
||||
if (conf.netmail_sem != NULL) {
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
} else if (conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_ECHOMAIL_AREA || conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->type == TYPE_NEWSGROUP_AREA) {
|
||||
if (conf.echomail_sem != NULL) {
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
close(sem_fd);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user