Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed RAD_CONFIG entry in Perl #715

Merged
merged 1 commit into from Jun 27, 2014
Merged

Removed RAD_CONFIG entry in Perl #715

merged 1 commit into from Jun 27, 2014

Conversation

qnet-herwin
Copy link
Contributor

This is an undocumented read-only copy of RAD_CHECK. If you ever need
something like this, it can be created very easily in Perl.

This should not be merged to 3.0.x, as it breaks backwards
compatibility.

@arr2036
Copy link
Member

arr2036 commented Jun 27, 2014

Wrong one. RAD_CHECK is deprecated, RAD_CONFIG is correct. The code should all be switched to RAD_CONFIG.

@arr2036
Copy link
Member

arr2036 commented Jun 27, 2014

The idea is the list names in the modules match the list name in the server core...

@qnet-herwin
Copy link
Contributor Author

In that case I assume https://github.com/FreeRADIUS/freeradius-server/blob/master/src/modules/rlm_perl/rlm_perl.c#L876 should be updated as well, to make the RAD_CONFIG hash read/write instead of read-only?

@arr2036
Copy link
Member

arr2036 commented Jun 27, 2014

Yes

RAD_CONFIG used to be an undocumented read-only clone of RAD_CHECK,
where RAD_CHECK was named incorrectly. Remove the RAD_CHECK, make
RAD_CONFIG read/write.

This should not be merged to 3.0.x, as it breaks backwards
compatibility.
@qnet-herwin
Copy link
Contributor Author

Just pushed an update

@arr2036
Copy link
Member

arr2036 commented Jun 27, 2014

Looks good. Thanks.

If you have any ideas about avoiding all the unnecessary marshalling and unmarshaling? Seems really inefficient the way we're doing it now...

arr2036 added a commit that referenced this pull request Jun 27, 2014
@arr2036 arr2036 merged commit 099f994 into FreeRADIUS:master Jun 27, 2014
@qnet-herwin
Copy link
Contributor Author

On 27-06-14 14:41, Arran Cudbard-Bell wrote:

If you have any ideas about avoiding all the unnecessary marshalling and
unmarshaling? Seems really inefficient the way we're doing it now...

The default trick for things like this is to create a hashref (reference
to a hash) instead of a hash. This way you only have to pass a reference
(a bit like a pointer in C) to the perl script.

I thought there was some information on this in the O'Reily books
"Programming Perl" and "Advanced Perl Programming", but there wasn't.
Some possible interesting reads:

If you're looking for an example implementation, try mod_perl of Apache.
That's probably the most mature perl embedding there is.

Herwin Weststrate

@qnet-herwin qnet-herwin deleted the perl_remove_rad_config branch August 12, 2014 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants