#2885 Some cron module lib fuctions don't work with foreign_call.


Several functions in cron-lib.pl don't operate on structures ($job) passed as arguments (which is suggested
in their comments), but on structures that happen to be referred by global variable of the same name ($job) as
supposed local variable. It works OK when the functions
are called in cron module scripts, because the global
variable $job is accessible from within the functions,
but when calling the functions as foreign module functions, the global variable isn't visible due to wrapping the foreign library into its namespace, I think.

There is similar problem with function parse_range_input where the %in is accessed both via local reference
(passed by argument) ($in->{'foo'}) and directly via
global variable ($in{'foo'}). The latter isn't accessible
when the function is called as foreign.

Perhaps attached patch can fix it.


  • Radek Vykydal

    Radek Vykydal - 2007-08-15

    patch of cron-lib.pl

  • Jamie Cameron

    Jamie Cameron - 2007-08-16
    • status: open --> closed
  • Jamie Cameron

    Jamie Cameron - 2007-08-16

    Logged In: YES
    Originator: NO

    Thanks for the patch - that is indeed a bug, which I will fix with your patch in the next Webmin release.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks