This limitation is intrinsic to the design of `poll(2)` and poll-esque APIs.
It is not necessarily a reason not to offer this rather simple API, as use of
poll(2) and poll(2)-like APIs is widespread and users are likely to appreciate
- an API which does not provide significant impedence discontinuities to
+ an API which does not provide significant impedance discontinuities to
applications which use select/poll, even if those applications suffer impaired
performance as a result.
Since OSes in general do not provide a way to get notified of these closures it
is not really possible to handle this automatically. It is essential that an
-application deregister the handle from the poll group first.
+application deregisters the handle from the poll group first.
**Q. How does code using a poll method determine what poll descriptors that
method supports?**
*
* The QUIC_OBJ is a base type for QUIC APL objects which provides functionality
* common to all QUIC objects and which supports having different APL objects
- * dynamically assume leader roles. It can therefore be seen as an extention of
+ * dynamically assume leader roles. It can therefore be seen as an extension of
* the SSL base class and extends the SSL object for QUIC APL objects. This
* avoids duplication of functionality for different types of QUIC object and
* allows access to common responsibilities of different types of APL object
*
* This structure must come at the start of a QUIC object structure definition.
*
- * ssl->type still determines the actual object type. An SSL object pointer s
- * can be safely cast to (QUIC_OBJ *) iff IS_QUIC(s) is true.
+ * ssl->type still determines the actual object type. An SSL object
+ * pointer s can be safely cast to (QUIC_OBJ *) iff IS_QUIC(s) is true.
*/
struct quic_obj_st {
/* SSL object common header. */
unsigned int is_port_leader : 1;
};
+/*
+ * Core Functions and Inlines
+ * ==========================
+ */
+
/*
* Initialises a QUIC_OBJ structure with zero or more roles active. Returns 1
* on success or 0 on failure.
/*
* Convenience Inlines
* ===================
+ *
+ * These inlines are expressed in terms of the core functions and inlines above.
*/
/* Get a pointer to the QUIC domain mutex. Always returns non-NULL. */
{
#ifndef OPENSSL_NO_QUIC
if (!IS_QUIC(s))
- return s;
+ return NULL;
return ossl_quic_get0_listener(s);
#else
- return s;
+ return NULL;
#endif
}
/* Packet trace support for OpenSSL */
#include "internal/nelem.h"
#include "internal/ssl_unwrap.h"
-#include "internal/quic_predef.h"
#include "internal/quic_trace.h"
-#include "quic/quic_local.h"
typedef struct {
int num;
if (!TEST_ptr(obj = OPENSSL_zalloc(sizeof(*obj))))
return NULL;
- obj->name = OPENSSL_strdup(name);
+ if (!TEST_ptr(obj->name = OPENSSL_strdup(name))) {
+ OPENSSL_free(obj);
+ return NULL;
+ }
+
obj->ssl = ssl;
return obj;
}
goto err;
if (ret != 1) {
- if (1 /* TODO */ && is_want(ssl, ret))
+ if (is_want(ssl, ret))
F_SPIN_AGAIN();
if (!TEST_int_eq(ret, 1))