francesco_carli
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
src/sn.c
|
|
@ -45,6 +45,7 @@ static int load_allowed_sn_community(n2n_sn_t *sss, char *path) { |
|
|
|
} |
|
|
|
|
|
|
|
HASH_ITER(hh, sss->communities, s, tmp) { |
|
|
|
if(s->is_federation) continue; |
|
|
|
HASH_DEL(sss->communities, s); |
|
|
|
if (NULL != s->header_encryption_ctx) |
|
|
|
free (s->header_encryption_ctx); |
|
|
@ -89,11 +90,9 @@ static int load_allowed_sn_community(n2n_sn_t *sss, char *path) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
s = (struct sn_community*)calloc(1,sizeof(struct sn_community)); |
|
|
|
comm_init(s,cmn_str); |
|
|
|
|
|
|
|
if(s != NULL) { |
|
|
|
strncpy((char*)s->community, cmn_str, N2N_COMMUNITY_SIZE-1); |
|
|
|
s->community[N2N_COMMUNITY_SIZE-1] = '\0'; |
|
|
|
/* loaded from file, this community is unpurgeable */ |
|
|
|
s->purgeable = COMMUNITY_UNPURGEABLE; |
|
|
|
/* we do not know if header encryption is used in this community,
|
|
|
|