mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Funny typo in SqlCompile; improved diagnostics of so load failure in Linux (Dli.cpp); improved connection failure diagnostics in OCI8
git-svn-id: svn://ultimatepp.org/upp/trunk@1642 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c6a4eee54a
commit
b1bb783874
4 changed files with 16 additions and 14 deletions
|
|
@ -170,15 +170,15 @@ struct DebugLogBlock
|
|||
const char *name;
|
||||
};
|
||||
|
||||
#define RLOG(a) UPP::LockLog(), UPP::VppLog() << a << EOL, UPP::UnlockLog()
|
||||
#define RLOG(a) UPP::LockLog(), UPP::VppLog() << a << UPP::EOL, UPP::UnlockLog()
|
||||
#define RLOGBEGIN() UPP::LockLog(), UPP::VppLog() << LOG_BEGIN
|
||||
#define RLOGEND() UPP::VppLog() << LOG_END, UPP::UnlockLog()
|
||||
#define RLOGBLOCK(n) UPP::DebugLogBlock MK__s(n)
|
||||
#define RLOGHEXDUMP(s, a) UPP::HexDump(UPP::VppLog(), s, a)
|
||||
#define RQUOTE(a) { LOG(#a); a; }
|
||||
#define RLOGSRCPOS() UPP::LockLog(), UPP::VppLog() << __FILE__ << '#' << __LINE__ << EOL
|
||||
#define RDUMP(a) UPP::LockLog(), UPP::VppLog() << #a << " = " << (a) << EOL, UPP::UnlockLog()
|
||||
#define RDUMPC(c) UPP::LockLog(), UPP::DumpContainer(UPP::VppLog() << #c << ':' << EOL, (c)), UPP::UnlockLog()
|
||||
#define RLOGSRCPOS() UPP::LockLog(), UPP::VppLog() << __FILE__ << '#' << __LINE__ << UPP::EOL
|
||||
#define RDUMP(a) UPP::LockLog(), UPP::VppLog() << #a << " = " << (a) << UPP::EOL, UPP::UnlockLog()
|
||||
#define RDUMPC(c) UPP::LockLog(), UPP::DumpContainer(UPP::VppLog() << #c << ':' << UPP::EOL, (c)), UPP::UnlockLog()
|
||||
|
||||
// Crash support
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ typedef HMODULE DLLHANDLE;
|
|||
typedef void *DLLHANDLE;
|
||||
#endif
|
||||
|
||||
#define LLOG(x)
|
||||
#define LLOG(x) // RLOG(x)
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
|
||||
|
|
@ -163,7 +163,8 @@ void *CheckDll__(const char *fn, const char *const *names, UPP::Vector<void *>&
|
|||
{
|
||||
void *hmod = dlopen(fn, RTLD_LAZY | RTLD_GLOBAL);
|
||||
if(!hmod) {
|
||||
LLOG("Error loading library " << fn << ": " << dlerror());
|
||||
RLOG("prdel");
|
||||
RLOG("Error loading library " << fn << ": " << dlerror());
|
||||
/*
|
||||
for(int i = 0; i < 100; i++) {
|
||||
hmod = dlopen(fn + ("." + UPP::AsString(i)), RTLD_LAZY | RTLD_GLOBAL);
|
||||
|
|
@ -181,15 +182,16 @@ void *CheckDll__(const char *fn, const char *const *names, UPP::Vector<void *>&
|
|||
if(optional) exp++;
|
||||
void *proc = dlsym(hmod, exp);
|
||||
if(!proc && !optional) {
|
||||
if(!missing)
|
||||
LLOG(fn << " missing exports:");
|
||||
LLOG(exp);
|
||||
if(!missing) {
|
||||
RLOG(fn << " missing exports:");
|
||||
}
|
||||
RLOG(exp);
|
||||
}
|
||||
plist.Add(proc);
|
||||
}
|
||||
|
||||
if(missing) {
|
||||
LLOG(missing << " missing symbols total");
|
||||
RLOG(missing << " missing symbols total");
|
||||
dlclose(hmod);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define LLOG(x) // LLOG(x)
|
||||
#define LLOG(x) RLOG(x)
|
||||
|
||||
//#define DLLFILENAME "ora803.dll"
|
||||
#define DLLFILENAME "oci.dll"
|
||||
|
|
@ -35,13 +35,13 @@ static String OciError(T_OCI8& oci8, OCIError *errhp, int *code)
|
|||
}
|
||||
|
||||
bool Oracle8::AllocOciHandle(void *hp, int type) {
|
||||
LLOG("AllocOciHandle(" << type << "), envhp = " << envhp);
|
||||
LLOG("AllocOciHandle(type " << type << "), envhp = " << FormatIntHex(envhp));
|
||||
*(dvoid **)hp = NULL;
|
||||
return oci8 && !oci8.OCIHandleAlloc(envhp, (dvoid **)hp, type, 0, NULL);
|
||||
}
|
||||
|
||||
void Oracle8::FreeOciHandle(void *hp, int type) {
|
||||
LLOG("FreeOciHandle(" << type << ")");
|
||||
LLOG("FreeOciHandle(" << FormatIntHex(hp) << ", type " << type << ")");
|
||||
if(oci8 && hp) oci8.OCIHandleFree(hp, type);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect)
|
|||
while(s < e) {
|
||||
byte c = *s++;
|
||||
if(c < 32 || c > 126 || c == 39 || c == 92) {
|
||||
*r << '\\\\';
|
||||
*r << '\\' << '\\';
|
||||
r->Cat(((c >> 6) & 3) + '0');
|
||||
r->Cat(((c >> 3) & 7) + '0');
|
||||
r->Cat((c & 7) + '0');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue