[Openvpn-devel] Patch: Output log message after routes is added
--- forward-orig.c Fri Jul 30 22:08:22 2004 +++ forward.c Sun Aug 8 09:48:21 2004 @@ -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? -- _ Mathias Sundman (^) ASCII Ribbon Campaign NILINGS ABXNO HTML/RTF in e-mail Tel: +46-(0)8-666 32 28 / \ NO Word docs in e-mail
Re: [Openvpn-devel] Patch: Output log message after routes is added
Mathias Sundman said: > --- forward-orig.c Fri Jul 30 22:08:22 2004 > +++ forward.c Sun Aug 8 09:48:21 2004 > @@ -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? 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
Re: [Openvpn-devel] Patch: Output log message after routes is added
On Sun, 8 Aug 2004, James Yonan wrote: Mathias Sundman said: --- forward-orig.c Fri Jul 30 22:08:22 2004 +++ forward.c Sun Aug 8 09:48:21 2004 @@ -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? 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. 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. * 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. * 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. 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)? -- _ Mathias Sundman (^) ASCII Ribbon Campaign NILINGS ABXNO HTML/RTF in e-mail Tel: +46-(0)8-666 32 28 / \ NO Word docs in e-mail