void libttest_session_close (tr_session * session) { char * sandbox; sandbox = tr_strdup (tr_sessionGetConfigDir (session)); tr_sessionClose (session); tr_logFreeQueue (tr_logGetQueue ()); session = NULL; libtest_sandbox_destroy (sandbox); tr_free (sandbox); }
static void pumpLogMessages (FILE * logfile) { const tr_log_message * l; tr_log_message * list = tr_logGetQueue (); for (l=list; l!=NULL; l=l->next) printMessage (logfile, l->level, l->name, l->message, l->file, l->line); if (logfile != NULL) fflush (logfile); tr_logFreeQueue (list); }
static void pumpLogMessages (tr_sys_file_t logfile) { const tr_log_message * l; tr_log_message * list = tr_logGetQueue (); for (l=list; l!=NULL; l=l->next) printMessage (logfile, l->level, l->name, l->message, l->file, l->line); if (logfile != TR_BAD_SYS_FILE) tr_sys_file_flush (logfile, NULL); tr_logFreeQueue (list); }