From: schnorr Date: Mon, 13 Dec 2010 16:45:27 +0000 (+0000) Subject: [trace] stop tracing process if user sets its category to NULL X-Git-Tag: v3.6_beta2~709 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1c776224d750723000d0e3753878e0733e469006?ds=sidebyside [trace] stop tracing process if user sets its category to NULL git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9214 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/instr/instr_msg_process.c b/src/instr/instr_msg_process.c index ba1faf6428..b133f433aa 100644 --- a/src/instr/instr_msg_process.c +++ b/src/instr/instr_msg_process.c @@ -28,6 +28,13 @@ void TRACE_msg_set_process_category(m_process_t process, const char *category, c "Process %p(%s). Tracing already knows a process with name %s." "The name of each process must be unique.", process, process->name, process->name); + if (category == NULL) { + //if user provides a NULL category, process is no longer traced + xbt_free (process->category); + process->category = NULL; + return; + } + //set process category process->category = xbt_strdup(category); DEBUG3("MSG process %p(%s), category %s", process, process->name, process->category);