Fix logging bug in gdnd and add lots of double ckecking of logs.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27676 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-01-25 08:41:30 +00:00
parent 456b2a7d49
commit beae2e1e2a
3 changed files with 218 additions and 154 deletions

View file

@ -1,6 +1,9 @@
2009-01-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSString.m: Fix for bug #25400
* Tools/gdnc.m: Fix failure to log exception (bug #25396)
* Tools/gdomap.c: Use snprintf for paranoid double check
of data in log buffer.
2009-01-23 Riccardo Mottola <rmottola@users.sf.net>

View file

@ -42,14 +42,13 @@
static BOOL debugging = NO;
static BOOL is_daemon = NO; /* Currently running as daemon. */
static BOOL auto_stop = NO; /* Should we shut down when unused? */
static char ebuf[2048];
#ifdef HAVE_SYSLOG
static int log_priority = LOG_DEBUG;
static void
gdnc_log (int prio)
gdnc_log (int prio, const char *ebuf)
{
if (is_daemon)
{
@ -87,8 +86,8 @@ gdnc_log (int prio)
#define LOG_ERR 1
#define LOG_INFO 0
#define LOG_WARNING 0
void
gdnc_log (int prio)
static void
gdnc_log (int prio, const char *ebuf)
{
write (2, ebuf, strlen (ebuf));
write (2, "\n", 1);
@ -1121,7 +1120,7 @@ main(int argc, char** argv, char** env)
}
NS_HANDLER
{
gdnc_log(LOG_CRIT);
gdnc_log(LOG_CRIT, [[localException description] UTF8String]);
DESTROY(t);
}
NS_ENDHANDLER

File diff suppressed because it is too large Load diff