New extension callback features.
[openssl.git] / ssl / d1_pkt.c
index 40633a8705d84ac6edb33f4eb0d1673f6e7c8e90..ed246a007807c9c59e96664e28f9154254150377 100644 (file)
@@ -255,6 +255,7 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority)
        /* insert should not fail, since duplicates are dropped */
        if (pqueue_insert(queue->q, item) == NULL)
                {
+               SSLerr(SSL_F_DTLS1_BUFFER_RECORD, ERR_R_INTERNAL_ERROR);
                OPENSSL_free(rdata);
                pitem_free(item);
                return(0);
@@ -757,9 +758,8 @@ int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
                if (!ssl3_setup_buffers(s))
                        return(-1);
 
-    /* XXX: check what the second '&& type' is about */
        if ((type && (type != SSL3_RT_APPLICATION_DATA) && 
-               (type != SSL3_RT_HANDSHAKE) && type) ||
+               (type != SSL3_RT_HANDSHAKE)) ||
            (peek && (type != SSL3_RT_APPLICATION_DATA)))
                {
                SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR);