For int, it returns -1, if it sees the INT flag.

I think of the following behavior: if it sees the INT flag and pv is NULL, 
return -1; else, return 1;

________________________________
From: Daniel-Constantin Mierla <mico...@gmail.com>
Sent: Friday, August 4, 2023 3:37:27 PM
To: Kamailio (SER) - Development Mailing List
Subject: [sr-dev] Re: Question for not_empty() config function

Hello,

I guess it was designed for string. What does it return now for int type?

Overall, for me it would be fine to extend for int, or maybe better add a new 
function if someone considers this one becomes confusing.

Cheers,
Daniel

On Thu, Aug 3, 2023 at 2:03 PM Stefan-Cristian Mititelu 
<stefan-cristian.mitit...@1and1.ro<mailto:stefan-cristian.mitit...@1and1.ro>> 
wrote:

Hello, I have a question for [1] config function.

Can I extend it to work with INTs too? e.g. if pv not NULL and INT flag, return 
1. This would help, because one won't need to know the type of the pvar 
beforehand, for using this function.

Or is it meant to be used only with string pv only?

[1] https://www.kamailio.org/docs/modules/devel/modules/pv.html#pv.f.not_empty



Thank you,
Stefan


_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to 
sr-dev-le...@lists.kamailio.org<mailto:sr-dev-le...@lists.kamailio.org>


--
Daniel-Constantin Mierla - https://www.asipto.com
https://twitter.com/miconda - https://www.linkedin.com/in/miconda
Kamailio Advanced Training - https://www.asipto.com/u/kat
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to