emulator opengl: more few fixups needed for the system to load.
Change-Id: I698b14d0f594c091c237a605aeefbb048bf746ca
This commit is contained in:
committed by
Guy Zadickario
parent
613025efb3
commit
5def410ff5
@@ -148,12 +148,11 @@ const unsigned char *TcpStream::readFully(void *buf, size_t len)
|
||||
{
|
||||
if (!valid()) return NULL;
|
||||
if (!buf) {
|
||||
ERR("TcpStream::readFully failed, buf=NULL");
|
||||
return NULL; // do not allow NULL buf in that implementation
|
||||
}
|
||||
size_t res = len;
|
||||
while (res > 0) {
|
||||
ssize_t stat = ::recv(m_sock, (char *)(buf) + len - res, len, 0);
|
||||
ssize_t stat = ::recv(m_sock, (char *)(buf) + len - res, res, 0);
|
||||
if (stat == 0) {
|
||||
// client shutdown;
|
||||
return NULL;
|
||||
@@ -161,7 +160,6 @@ const unsigned char *TcpStream::readFully(void *buf, size_t len)
|
||||
if (errno == EINTR) {
|
||||
continue;
|
||||
} else {
|
||||
ERR("TcpStream::readFully failed (buf 0x%x): %s\n", buf, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
@@ -175,7 +173,6 @@ const unsigned char *TcpStream::read( void *buf, size_t *inout_len)
|
||||
{
|
||||
if (!valid()) return NULL;
|
||||
if (!buf) {
|
||||
ERR("TcpStream::read failed, buf=NULL");
|
||||
return NULL; // do not allow NULL buf in that implementation
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@ dynLibrary *dynLibrary::open(const char *p_libName)
|
||||
#endif
|
||||
|
||||
if (lib->m_lib == NULL) {
|
||||
printf("Failed to load %s\n", p_libName);
|
||||
#ifndef _WIN32
|
||||
printf("error %s\n", dlerror()); //only on linux
|
||||
#endif
|
||||
delete lib;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user