Fix log channel initialization at bionic/logd_write.c.
log_channel_t contains fd member, which is file descriptor for exact logging channel. change cc05d1271680d6a7804bc89d3b1fe14c40b32396 lacks initialization of this member in __write_to_log_init(), thus logging code is not working, although not crashable. Additional details may be found in comments here: http://review.source.android.com/5617
This commit is contained in:
parent
95604529ec
commit
c22da7ed32
@ -113,6 +113,8 @@ static int __write_to_log_init(log_id_t log_id, struct iovec *vec)
|
|||||||
log_channels[log_id].logger =
|
log_channels[log_id].logger =
|
||||||
(fd < 0) ? __write_to_log_null : __write_to_log_kernel;
|
(fd < 0) ? __write_to_log_null : __write_to_log_kernel;
|
||||||
|
|
||||||
|
log_channels[log_id].fd = fd;
|
||||||
|
|
||||||
pthread_mutex_unlock(&log_init_lock);
|
pthread_mutex_unlock(&log_init_lock);
|
||||||
|
|
||||||
return log_channels[log_id].logger(log_id, vec);
|
return log_channels[log_id].logger(log_id, vec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user