akeranen / the-one

The Opportunistic Network Environment simulator
Other
208 stars 198 forks source link

getInterface(interfaceNo) starts at 1 #88

Closed Lithimlin closed 4 years ago

Lithimlin commented 4 years ago

So, why does the counter for interfaces of the DTNHost getter getInterface(int interfaceNo) start at 1? This is super confusing and lead to quite a few errors for me already. Where was this used so far?

akeranen commented 4 years ago

Don’t quite remember the rationale anymore, but the reason might have been to save the index 0 for special cases. But would be a bit too late to change that now.