[OpenSER-Devel] [ openser-Feature Requests-1901736 ] return statement should accept pv argument

SourceForge.net noreply at sourceforge.net
Thu Feb 28 15:39:43 CET 2008


Feature Requests item #1901736, was opened at 2008-02-26 00:36
Message generated for change (Comment added) made by dan_pascu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1901736&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: None
>Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel-Constantin Mierla (miconda)
Summary: return statement should accept pv argument

Initial Comment:
return statement should accept pv argument.  below is an example of a problem that this feature would solve.

-- juha

> it should be possible to write this:
>
> route[1] {
> 	route(2);
> 	return($retcode);
> }
>
> instead of this:
>
> route[1] {
> 	route(2);
> 	switch($retcode) {
> 	case 1:
> 		return(1);
> 	case 2:
> 		return(2);
> 	default:
> 		return(-1);
> 	}
> }
>

----------------------------------------------------------------------

>Comment By: Dan (dan_pascu)
Date: 2008-02-28 16:39

Message:
Logged In: YES 
user_id=1296758
Originator: NO

Sorry, the last comment was mine, but I was not logged in. I reopened this
ticket until we agree on the proposal to use False for empty strings.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-02-28 16:36

Message:
Logged In: NO 

I think the return values for null (False) and strings (True) are fine.
However, I would suggest that empty strings ("") should also return False.

----------------------------------------------------------------------

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-02-27 00:45

Message:
Logged In: YES 
user_id=1246013
Originator: NO

I committed on trunk support for this feature. However, some open issues,
we have to discuss and find the right solutions. It is about when the PV
parameter has null or string value. Initial version does:
- when PV is null, acts as return(-1) -- return false
- when PV is string, acts as return(1) -- return true
- when PV is int, returns the value

Comments?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1901736&group_id=139143



More information about the Devel mailing list