forked from Telodendria/Telodendria
Begin debugging OpenSSL.
This commit is contained in:
parent
a525830b64
commit
05cf076ebc
4 changed files with 6 additions and 4 deletions
2
TODO.txt
2
TODO.txt
|
@ -82,7 +82,7 @@ Milestone: v0.3.0
|
|||
[ ] Refactor dev pages so function description and
|
||||
return value are in the same location.
|
||||
|
||||
[ ] Debug memory leaks with caching
|
||||
[x] Debug memory leaks with caching
|
||||
[ ] Debug OpenSSL
|
||||
|
||||
[~] Client-Server API
|
||||
|
|
2
src/Db.c
2
src/Db.c
|
@ -805,7 +805,7 @@ DbUnlock(Db * db, DbRef * ref)
|
|||
{
|
||||
pthread_mutex_unlock(&db->lock);
|
||||
Log(LOG_ERR, "Failed to truncate file on disk.");
|
||||
Log(LOG_ERR, "Error: %s", strerror(errno));
|
||||
Log(LOG_ERR, "Error on fd %d: %s", ref->fd, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ ROUTE_IMPL(RouteUiaFallback, path, argp)
|
|||
if (!authType)
|
||||
{
|
||||
/* This should never happen */
|
||||
Log(LOG_ERR, "Programmer error in RouteUiaFallback()!");
|
||||
HttpResponseStatus(args->context, HTTP_INTERNAL_SERVER_ERROR);
|
||||
return MatrixErrorCreate(M_UNKNOWN);
|
||||
}
|
||||
|
@ -55,6 +56,7 @@ ROUTE_IMPL(RouteUiaFallback, path, argp)
|
|||
config = ConfigLock(args->matrixArgs->db);
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "UIA fallback failed to lock configuration.");
|
||||
HttpResponseStatus(args->context, HTTP_INTERNAL_SERVER_ERROR);
|
||||
return MatrixErrorCreate(M_UNKNOWN);
|
||||
}
|
||||
|
|
|
@ -226,7 +226,6 @@ TlsRead(void *cookie, void *buf, size_t nBytes)
|
|||
|
||||
if (ret <= 0)
|
||||
{
|
||||
ret = -1;
|
||||
switch (SSL_get_error(ssl->ssl, ret))
|
||||
{
|
||||
case SSL_ERROR_WANT_READ:
|
||||
|
@ -243,6 +242,7 @@ TlsRead(void *cookie, void *buf, size_t nBytes)
|
|||
errno = EIO;
|
||||
break;
|
||||
}
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -256,7 +256,6 @@ TlsWrite(void *cookie, void *buf, size_t nBytes)
|
|||
|
||||
if (ret <= 0)
|
||||
{
|
||||
ret = -1;
|
||||
switch (SSL_get_error(ssl->ssl, ret))
|
||||
{
|
||||
case SSL_ERROR_WANT_READ:
|
||||
|
@ -273,6 +272,7 @@ TlsWrite(void *cookie, void *buf, size_t nBytes)
|
|||
errno = EIO;
|
||||
break;
|
||||
}
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue