- if(x) {
- syslog(LOG_ERR, _("Metadata socket error for %s (%s): %s"),
- c->name, c->hostname, strerror(x));
- return -1;
- }
+ /* 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];
+ char *bufp = inbuf, *endp;