Changeset 45cf49f for functions.c
- Timestamp:
- Feb 23, 2009, 5:42:47 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 5283b01
- Parents:
- 1375a6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r10d67d5 r45cf49f 3352 3352 { 3353 3353 va_list ap; 3354 char *buff , *buff2;3354 char *buff; 3355 3355 char *nl; 3356 char *date;3357 time_t now;3358 3359 now=time(NULL);3360 date=owl_strdup(ctime(&now));3361 date[strlen(date)-1]='\0';3362 3356 3363 3357 va_start(ap, fmt); 3364 3358 3365 3359 buff = g_strdup_vprintf(fmt, ap); 3366 buff2 = owl_sprintf("%s %s", date, buff);3367 3360 owl_function_debugmsg("ERROR: %s", buff); 3368 3361 nl = strchr(buff, '\n'); … … 3373 3366 owl_function_makemsg("[Error] %s", buff); 3374 3367 } 3375 owl_ errqueue_append_err(owl_global_get_errqueue(&g), buff2);3368 owl_function_log_err(buff); 3376 3369 va_end(ap); 3370 owl_free(buff); 3371 } 3372 3373 void owl_function_log_err(char *string) 3374 { 3375 char *date; 3376 time_t now; 3377 char *buff; 3378 3379 now=time(NULL); 3380 date=owl_strdup(ctime(&now)); 3381 date[strlen(date)-1]='\0'; 3382 3383 buff = owl_sprintf("%s %s", date, string); 3384 3385 owl_errqueue_append_err(owl_global_get_errqueue(&g), buff); 3386 3387 owl_free(buff); 3377 3388 owl_free(date); 3378 owl_free(buff);3379 owl_free(buff2);3380 3389 } 3381 3390
Note: See TracChangeset
for help on using the changeset viewer.