I agree there are two separate problems here: 1) If I understand Thiago correctly, it's a bug that there's a way to compile without defining either.
2) It's also a problem that the documentation on how to build iotivity for various OS's https://wiki.iotivity.org/build_for_your_system does not mention anything about having to define either one of these. Perhaps the doc maintainer can help fix that :) I expect we should have a page that shows all the cross-platform build options, their default value, and what they mean. > -----Original Message----- > From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev- > bounces at lists.iotivity.org] On Behalf Of Thiago Macieira > Sent: Thursday, September 15, 2016 2:15 PM > To: Gregg Reynolds <dev at mobileink.com> > Cc: iotivity-dev at lists.iotivity.org > Subject: Re: [dev] ROUTING default > > On quinta-feira, 15 de setembro de 2016 15:56:46 PDT Gregg Reynolds wrote: > > > Not sure what you mean. Why do you think it is a bug? > > > > The problem I hit was that I did not define a ROUTING_X macro in my > > app build (using makefiles). (fwiw, why should I? bad doc!) So my > > client code and the stack code had different ideas about the size of > OCDevAddr. > > > > Since one of EP or GW must be defined, "#ifdef EP || GW" is an error, > > in my view. It should be sth like "#ifdef GW ... non-default ... > > #else ...default ... ", no? > > > > And actually if at least one must be defined why not just default to > > EP and > > *allow* GW? Is it legal to be both? > > > > > All nodes must be routable, so disabling the functionality doesn't > > > make sense. > > > > #ifdef EP || GW already disables by default. > > > > > > 3. It looks to me like client build code should not need to > > > > specify a routing mode. True? > > > > > > Yes and no. It shouldn't have to choose: it's an EP. > > Ah, I see what you mean. > > Well, it's a legacy of how the feature was introduced. We weren't sure > whether we were going to enable the new functionality, so it was possible to > disable it completely. But then we decided that a node would always be > routable, so I guess the case for both disabled bit-rotted. We should update > the Scons files to remove such an option. You can also clean up the headers > to assume that one of them is always defined. > > I don't know if it's possible for a gateway to also serve as an endpoint. I > don't > see any reason why it shouldn't be, but we may never have tested. > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > iotivity-dev mailing list > iotivity-dev at lists.iotivity.org > https://lists.iotivity.org/mailman/listinfo/iotivity-dev
