/*
meta.c -- handle the meta communication
- Copyright (C) 2000-2009 Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2000-2012 Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
2006 Scott Lamb <slamb@slamb.org>
}
buffer_add(&c->outbuf, buffer, length);
- event_add(&c->outevent, NULL);
+ io_set(&c->io, IO_READ | IO_WRITE);
return true;
}
c->name, c->hostname);
return false;
}
-
} else {
buffer_add(&c->outbuf, buffer, length);
}
- event_add(&c->outevent, NULL);
+ io_set(&c->io, IO_READ | IO_WRITE);
return true;
}
return true;
}
+ /* Change newline to null byte, just like non-SPTPS requests */
+
+ if(data[length - 1] == '\n')
+ ((char *)data)[length - 1] = 0;
+
/* Otherwise we are waiting for a request */
return receive_request(c, data);