R: [Users] difference between return, break and exit.

D'Addelfio Davide Davide.D'Addelfio at italtel-consultant.com
Mon Jun 26 14:52:44 CEST 2006


Thanks for quick reply. Do you think in this case is bettr to use return or break function?

 

if (method=="INVITE")  {

            route(7);

            return;

      } else if (method=="ACK")  {

            route(8);

            return;

      } else if (method=="CANCEL")  {

            route(9);

            return;

      } else if (method=="BYE")  {

            route(10);

            return;

      };

 

      if (loose_route()) { 

            xlog("L_INFO","Eseguo loose_route");

            # mark routing logic in request

            append_hf("P-hint: rr-enforced\r\n"); 

            route(1);

            return;

      };

 

      if (uri==myself) {

 

            if (method=="REGISTER") {

 

                  # Uncomment this if you want to use digest authentication

                  #if (!www_authorize("138.132.167.240", "subscriber")) {

                  #     www_challenge("138.132.167.240", "0");

                  #     exit;

                  #};

 

                  save("location");

                  #exit;

                  return;

            };

 

      };

 

Thanks

Davide 

 

________________________________

Da: raviprakash sunkara [mailto:sunkara.raviprakash.feb14 at gmail.com] 
Inviato: lunedì 26 giugno 2006 14.21
A: D'Addelfio Davide
Oggetto: Re: [Users] difference between return, break and exit.

 

Hi Davide ,

 openser 0.9 is having the break,,,  now in 1.0.1 and 1.1.0  is using.... now..
return is also used ...
But the difference b/n the return and exit.. is
In retuern the function is  + ve or - ve return type..
where exit .... to gettinh out the condition function;

bettter to use only exit  function...



On 6/26/06, D'Addelfio Davide <Davide.D'Addelfio at italtel-consultant.com> wrote:

Hi to all,

 

i need to understand the difference in usage between return, break and exit.

Could someone help me, maybe with some example?

 

Thanks

Davide   

 


_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users






-- 
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
www.hyperion-tech.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20060626/92830a7f/attachment.htm 


More information about the Users mailing list