由于fsync是阻塞的会丢失log,删除fsync调用
This commit is contained in:
parent
8733e5bae9
commit
44b614e333
@ -511,9 +511,9 @@ void osp_net_log_proc(char *pMsg, uint32_t len, uint32_t port)
|
|||||||
OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t msg_type)
|
OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t msg_type)
|
||||||
{
|
{
|
||||||
|
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
static FILE *file = NULL;
|
static FILE *file = NULL;
|
||||||
uint32_t fd;
|
/*uint32_t fd;*/
|
||||||
|
|
||||||
if (NULL == g_OspLogSem)
|
if (NULL == g_OspLogSem)
|
||||||
{
|
{
|
||||||
@ -564,6 +564,7 @@ OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t
|
|||||||
g_ucFflushEnable = 0;
|
g_ucFflushEnable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /*feature enhancement1300*/
|
||||||
fd = fileno(file);
|
fd = fileno(file);
|
||||||
ret = fsync(fd);
|
ret = fsync(fd);
|
||||||
if(OSP_OK != ret)
|
if(OSP_OK != ret)
|
||||||
@ -573,6 +574,7 @@ OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t
|
|||||||
osp_sem_give(g_OspLogSem);
|
osp_sem_give(g_OspLogSem);
|
||||||
return OSP_ERROR;
|
return OSP_ERROR;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
osp_sem_give(g_OspLogSem);
|
osp_sem_give(g_OspLogSem);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user