- inlen = recv(c->socket, inbuf, sizeof inbuf - c->inbuf.len, 0);
+ /* Change newline to null byte, just like non-SPTPS requests */
+
+ if(request[length - 1] == '\n') {
+ request[length - 1] = 0;
+ }
+
+ /* Otherwise we are waiting for a request */
+
+ return receive_request(mesh, c, request);
+}
+
+bool receive_meta(meshlink_handle_t *mesh, connection_t *c) {
+ int inlen;
+ char inbuf[MAXBUFSIZE];
+
+ inlen = recv(c->socket, inbuf, sizeof(inbuf), 0);