Mercurial > hg > audiodb
comparison audioDB.cpp @ 81:1d2eecdc9639
Comment regarding leakiness of server error handling.
(Will become important soon. Probably easiest handled by a check in
the destructor.)
author | mas01cr |
---|---|
date | Mon, 01 Oct 2007 18:37:35 +0000 |
parents | beff1e23e95a |
children | 94b6fb73d2ee |
comparison
equal
deleted
inserted
replaced
79:beff1e23e95a | 81:1d2eecdc9639 |
---|---|
2 | 2 |
3 #define O2_DEBUG | 3 #define O2_DEBUG |
4 | 4 |
5 void audioDB::error(const char* a, const char* b, const char *sysFunc) { | 5 void audioDB::error(const char* a, const char* b, const char *sysFunc) { |
6 if(isServer) { | 6 if(isServer) { |
7 /* FIXME: I think this is leaky -- we never delete err. actually | |
8 deleting it is tricky, though; it gets placed into some | |
9 soap-internal struct with uncertain extent... -- CSR, | |
10 2007-10-01 */ | |
7 char *err = new char[256]; /* FIXME: overflows */ | 11 char *err = new char[256]; /* FIXME: overflows */ |
8 snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : ""); | 12 snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : ""); |
9 /* FIXME: actually we could usefully do with a properly structured | 13 /* FIXME: actually we could usefully do with a properly structured |
10 type, so that we can throw separate faultstring and details. | 14 type, so that we can throw separate faultstring and details. |
11 -- CSR, 2007-10-01 */ | 15 -- CSR, 2007-10-01 */ |