mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 02:13:35 +02:00
Connection: Use CRLF for output too
This commit is contained in:
parent
b969e91bd1
commit
9dcb3c543a
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ void
|
||||||
connection::senses(int tick_id, bool dead, int energy, char around[4])
|
connection::senses(int tick_id, bool dead, int energy, char around[4])
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
snprintf(buf, sizeof(buf), "tick %d\n%senergy %d\naround %.8s\n\n", tick_id, dead ? "DEAD\n" : "", energy, around);
|
snprintf(buf, sizeof(buf), "tick %d\r\n%senergy %d\r\naround %.8s\r\n\r\n", tick_id, dead ? "DEAD\r\n" : "", energy, around);
|
||||||
|
|
||||||
pthread_mutex_lock(&buf_lock);
|
pthread_mutex_lock(&buf_lock);
|
||||||
out_buf.append(buf);
|
out_buf.append(buf);
|
||||||
|
@ -25,7 +25,7 @@ void
|
||||||
connection::bump(void)
|
connection::bump(void)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&buf_lock);
|
pthread_mutex_lock(&buf_lock);
|
||||||
out_buf.append("BUMP\n");
|
out_buf.append("BUMP\r\n");
|
||||||
pthread_mutex_unlock(&buf_lock);
|
pthread_mutex_unlock(&buf_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue