This commit is contained in:
Andrew Pamment 2017-03-19 13:42:36 +10:00
parent e35438782a
commit e9b8056047

2
bbs.c
View File

@ -76,7 +76,7 @@ void broadcast(char *mess, ...) {
vsnprintf(buffer, 512, mess, ap); vsnprintf(buffer, 512, mess, ap);
va_end(ap); va_end(ap);
snprintf(json, "{\"System\": \"%s\", \"Program\": \"MagickaBBS\", \"Message\": \"%s\"}", conf.bbs_name, buffer); snprintf(json, 1024, "{\"System\": \"%s\", \"Program\": \"MagickaBBS\", \"Message\": \"%s\"}", conf.bbs_name, buffer);
ret = sendto(bcast_sock, json, strlen(json) + 1, 0, (struct sockaddr *)&s, sizeof(struct sockaddr_in)); ret = sendto(bcast_sock, json, strlen(json) + 1, 0, (struct sockaddr *)&s, sizeof(struct sockaddr_in));