const struct utcp_connection *b = *(struct utcp_connection **)vb;
assert(a && b);
- assert(a->src && b->src);
int c = (int)a->src - (int)b->src;
}
int utcp_close(struct utcp_connection *c) {
+ if(c->rcvbuf.used) {
+ fprintf(stderr, "UTCP channel closed with stuff in receive buffer\n");
+ return reset_connection(c) ? 0 : -1;
+ }
+
if(utcp_shutdown(c, SHUT_RDWR) && errno != ENOTCONN) {
return -1;
}