Corrected a typo in line feed handling.
This commit is contained in:
@ -570,9 +570,11 @@ static int logmanager_write_log(
|
|||||||
} else {
|
} else {
|
||||||
snprintf(wp+timestamp_len-1, str_len, str);
|
snprintf(wp+timestamp_len-1, str_len, str);
|
||||||
}
|
}
|
||||||
if (wp[timestamp_len-1+str_len-2] != '\n') {
|
/** remove double line feed */
|
||||||
wp[timestamp_len-1+str_len-1]='\n';
|
if (wp[timestamp_len-1+str_len-2] == '\n') {
|
||||||
|
wp[timestamp_len-1+str_len-2]=' ';
|
||||||
}
|
}
|
||||||
|
wp[timestamp_len-1+str_len-1]='\n';
|
||||||
|
|
||||||
/** lock-free unregistration, includes flush if bb_isfull */
|
/** lock-free unregistration, includes flush if bb_isfull */
|
||||||
blockbuf_unregister(bb);
|
blockbuf_unregister(bb);
|
||||||
|
Reference in New Issue
Block a user