Re: Error: different number of preprocessor directives

Alex Balashov via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <[email protected]>

> On Jul 23, 2025, at 1:08 PM, Ben Kaufman via sr-users <[email protected]> wrote:
> 
>     • Finally it might be good to consider if you need all of those preprocessor defines and ifdefs.  Yes, the default sample config has many of them, but that's a situation where a single file is meant to be able to illustrate a lot of potential use cases.  In most real-world situations, you will program the server already knowing what you will/wont need and not need all of those feature flags.  Like, either my environment has RTPEngine and I'm going to use it, or it doeesn't.  I know this when I write my Kamailio scrip, so either I write the code I need or I don't.  It's likely that you can clean these up, resolve your issue, and have the benefit of a cleaner more easier read config as well.

+1!

My configs got far simpler and more legible once I conquered my fear of committing to hard code paths and stopped adding unnecessary cleverness.

-- Alex

--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com, https://www.csrpswitch.com
Tel: +1-706-510-6800

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.