Skip to content

Commit

Permalink
Fix sending of UDP server packets
Browse files Browse the repository at this point in the history
When sending packets, the gainspan module wants colons to separate the
fields, instead of a space and a tab when receiving.
  • Loading branch information
matthijskooijman committed Mar 27, 2014
1 parent f9a8613 commit e821b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GSModule/GSCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ bool GSCore::writeData(cid_t cid, IPAddress ip, uint16_t port, const uint8_t *bu

uint8_t header[28]; // Including a trailing 0 that snprintf insists to write
// TODO: Also support UDP server
size_t headerlen = snprintf((char*)header, sizeof(header), "\x1bY%x%s %u\t%04d", cid, ipbuf, port, len);
size_t headerlen = snprintf((char*)header, sizeof(header), "\x1bY%x%s:%u:%04d", cid, ipbuf, port, len);

// First, write the escape sequence up to the cid. After this, the
// module responds with <ESC>O or <ESC>F.
Expand Down

0 comments on commit e821b2b

Please sign in to comment.