Instead of duplication the restInit code, what about of just passing the useIpV6 value. I mean, replace:

```
  LM_F(("Listening on port %d", port));
  if (ngsi9Only)
    restInit(localIp, port, restServiceNgsi9V);
  else
    restInit(localIp, port, restServiceV);

  if (useIpV6)
  {
    LM_M(("IPv6 Listening on IP %s , port %d", localIpV6, port));
    if (ngsi9Only)
      restInit(localIpV6, port, restServiceNgsi9V, true);
    else
      restInit(localIpV6, port, restServiceV, true);
  }
```

with

```
  LM_F(("Listening on port %d", port));
  if (ngsi9Only)
    restInit(localIp, port, restServiceNgsi9V, useIpV6);
  else
    restInit(localIp, port, restServiceV, useIpV6);
```

This assumes two things:

* "Unification" in localp variable (as described in https://github.com/telefonicaid/fiware-orion/pull/176/files#r9188245)
* Modifications in restInit() function, so it always starts the IPv4 MHD server and starts the IPv6 MHD serrer instance only if the use IPv6 variable is true.