Mercurial > hg > audiodb
comparison common.cpp @ 370:2d5c3f8e8c22
Merge gcc-4.3-cleanups branch (-r629:642, but I consider that branch as
having served its purpose) onto the trunk.
Now compiles cleanly even with a fairly picky gcc. I await version 4.4
with bated breath.
author | mas01cr |
---|---|
date | Wed, 12 Nov 2008 15:40:40 +0000 |
parents | 94c18f128ce8 |
children | 4e68f7d4d524 342822c2d49a fbcc1303dfeb |
comparison
equal
deleted
inserted
replaced
355:94c18f128ce8 | 370:2d5c3f8e8c22 |
---|---|
51 | 51 |
52 void audioDB::error(const char* a, const char* b, const char *sysFunc) { | 52 void audioDB::error(const char* a, const char* b, const char *sysFunc) { |
53 | 53 |
54 | 54 |
55 if(isServer) { | 55 if(isServer) { |
56 /* FIXME: I think this is leaky -- we never delete err. actually | 56 /* FIXME: I think this is leaky -- we never delete err. |
57 deleting it is tricky, though; it gets placed into some | 57 actually deleting it is tricky, though; it gets placed into |
58 soap-internal struct with uncertain extent... -- CSR, | 58 some soap-internal struct with uncertain extent... -- CSR, |
59 2007-10-01 */ | 59 2007-10-01 */ |
60 char *err = new char[256]; /* FIXME: overflows */ | 60 char *err = new char[256]; /* FIXME: overflows */ |
61 snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : ""); | 61 snprintf(err, 255, "%s: %s\n%s", a, b, sysFunc ? strerror(errno) : ""); |
62 /* FIXME: actually we could usefully do with a properly structured | 62 /* FIXME: actually we could usefully do with a properly |
63 type, so that we can throw separate faultstring and details. | 63 structured type, so that we can throw separate faultstring |
64 -- CSR, 2007-10-01 */ | 64 and details. -- CSR, 2007-10-01 */ |
65 throw(err); | 65 throw(err); |
66 } else if (UseApiError){ | 66 } else if (UseApiError){ |
67 apierrortemp=-1; | 67 apierrortemp=-1; |
68 throw(apierrortemp); | 68 throw(apierrortemp); |
69 } else { | 69 } else { |