Patch: Output log message after routes is added
forward.c Sun Aug 8 09:48:21 2004 renamed from forward-orig.c Fri Jul 30 22:08:22 2004 +1 -0
@@ -243,6 +243,7 @@ update_time (); event_timeout_clear (&c->c2.route_wakeup); event_timeout_clear (&c->c2.route_wakeup_expire); + msg (M_INFO, "Finished adding routes to system."); } else {
James, could you include this in next beta?
If not, do you have a better idea for a log-message we can write after routes have been added to the system, so I can report "Connected" in the GUI after routes have been added?
Signature · 4 lines
_____________________________________________________________ Mathias Sundman (^) ASCII Ribbon Campaign NILINGS AB X NO HTML/RTF in e-mail Tel: +46-(0)8-666 32 28 / \ NO Word docs in e-mail
Quoted 12 lines · Mathias Sundman
forward.c Sun Aug 8 09:48:21 2004 renamed from forward-orig.c Fri Jul 30 22:08:22 2004 +1
-0@@ -243,6 +243,7 @@ update_time (); event_timeout_clear (&c->c2.route_wakeup); event_timeout_clear (&c->c2.route_wakeup_expire); + msg (M_INFO, "Finished adding routes to system."); } else {
Quoted 1 line
James, could you include this in next beta?
Yes, this is fine. Regarding the details:
* I take it that you are using the M_INFO message level so you can be sure the message will be in the log. Normally I would want to use something like D_ROUTE for this. And even if M_INFO is used, it can still be silenced with --verb 0.
* As is, the patch will cause the message to go to the log, even if there are no routes to add. In such a case, the message will be output showing the point in time at which routes would have been added, had they been present in the config. So maybe the message should read differently, such as "TUN/TAP interface up".
* The message will only be output if c->options.route_delay_defined is true. On Windows, this is always the case, so that's probably what you want.
James
Quoted 14 lines · James Yonan
Quoted 12 lines · Mathias Sundman
forward.c Sun Aug 8 09:48:21 2004 renamed from forward-orig.c Fri Jul 30 22:08:22 2004 +1
-0@@ -243,6 +243,7 @@ update_time (); event_timeout_clear (&c->c2.route_wakeup); event_timeout_clear (&c->c2.route_wakeup_expire); + msg (M_INFO, "Finished adding routes to system."); } else {
Quoted 8 lines
Quoted 1 line
James, could you include this in next beta?
Yes, this is fine. Regarding the details:
* I take it that you are using the
M_INFOmessage level so you can be sure the message will be in the log. Normally I would want to use something likeD_ROUTEfor this. And even ifM_INFOis used, it can still be silenced with --verb 0.
Exactly. I wanted it to be displayed at the lowest possible verb level. I think requirying atleast verb 1 for the GUI to work should be okay for all users.
Quoted 5 lines
* As is, the patch will cause the message to go to the log, even if there are no routes to add. In such a case, the message will be output showing the point in time at which routes would have been added, had they been present in the config. So maybe the message should read differently, such as "TUN/TAP interface up".
Sure, "TUN/TAP interface up" is fine with me. Lets use that instead.
Quoted 2 lines
* The message will only be output if
c->options.route_delay_definedis true. On Windows, this is always the case, so that's probably what you want.
Well, it's good enough for me, but it would have been better it worked on all platforms in all cases. Is there a better place to put it that will always work (but still after possible routes are added)?
Signature · 4 lines
_____________________________________________________________ Mathias Sundman (^) ASCII Ribbon Campaign NILINGS AB X NO HTML/RTF in e-mail Tel: +46-(0)8-666 32 28 / \ NO Word docs in e-mail