+ }
+}
+
+bool receive_meta_sptps(void *handle, uint8_t type, const void *vdata, uint16_t length) {
+ const char *data = vdata;
+ connection_t *c = handle;
+
+ if(!c) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "receive_meta_sptps() called with NULL pointer!");
+ abort();
+ }
+
+ if(type == SPTPS_HANDSHAKE) {
+ if(c->allow_request == ACK) {
+ return send_ack(c);
+ } else {
+ return true;
+ }
+ }
+
+ if(!data) {
+ return true;
+ }
+
+ /* Are we receiving a TCPpacket? */
+
+ if(c->tcplen) {
+ if(length != c->tcplen) {
+ return false;
+ }
+
+ receive_tcppacket(c, data, length);
+ c->tcplen = 0;
+ return true;
+ }
+
+ /* Change newline to null byte, just like non-SPTPS requests */
+
+ if(data[length - 1] == '\n') {
+ ((char *)data)[length - 1] = 0;