Modify

Opened 4 years ago

Closed 4 years ago

#15715 closed defect (fixed)

netifd proto script log problem

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Netifd Implementation
Component: base system Version: Trunk
Keywords: Cc:

Description

If i do echo "Script log message" in my netifd proto script then in it first call i see in logread:

daemon.notice netifd: test0 (758): Script log message

But ! on next calls i see no log messages !
Only first script call add it stdout message to log.
I found that the problem in main.c-> netifd_delete_process.
We just have to add:
memset(&proc->log, 0x0, sizeof(proc->log));
to the end of this function and then script log messages a successfully reached.
Please fix netifd->main.c source.

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by jow

Can you send a proper patch according to SubmittingPatches please?

comment:2 Changed 4 years ago by anonymous

The patch is wery simple:
--- ./a/main.c 2014-04-26 14:28:38.000000000 +0400
+++ ./b/main.c 2014-04-26 17:14:12.561686250 +0400
@@ -59,6 +59,7 @@

list_del(&proc->list);
ustream_free(&proc->log.stream);
close(proc->log.fd.fd);

+ memset(&proc->log, 0x0, sizeof(proc->log));

}


void

But i send it to openwrt-devel@…
Thanks a lot.

comment:3 Changed 4 years ago by nbd

should be fixed in r40570, please test

comment:4 Changed 4 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.