projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa1e9b0
)
Add missing newlines when copying variables from tinc.conf to an invitation file.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 27 Jan 2014 22:21:25 +0000
(23:21 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 27 Jan 2014 22:21:25 +0000
(23:21 +0100)
src/invitation.c
patch
|
blob
|
history
diff --git
a/src/invitation.c
b/src/invitation.c
index 59bcf456ec63075e1f45595af86761cf4a05d7d4..a94460e86ea23fa15ddbfdd10349028b21ced84d 100644
(file)
--- a/
src/invitation.c
+++ b/
src/invitation.c
@@
-404,8
+404,12
@@
int cmd_invite(int argc, char *argv[]) {
char buf[1024];
while(fgets(buf, sizeof buf, tc)) {
if((!strncasecmp(buf, "Mode", 4) && strchr(" \t=", buf[4]))
- || (!strncasecmp(buf, "Broadcast", 9) && strchr(" \t=", buf[9])))
+ || (!strncasecmp(buf, "Broadcast", 9) && strchr(" \t=", buf[9])))
{
fputs(buf, f);
+ // Make sure there is a newline character.
+ if(!strchr(buf, '\n'))
+ fputc('\n', f);
+ }
}
fclose(tc);
}