To me, adding a separate function for an extra two params is bloating the code.

The final two params are a direct passthrough, anyway. So your function simply 
becomes:

```
int _api_pres_refresh_watchers(str *pres, str *event, int type, str *file_uri, 
str *filename)
{
        return pres_refresh_watchers(pres, event, type, file_uri, filename);
}
```

Compared with:

```
int _api_pres_refresh_watchers(str *pres, str *event, int type)
{
        return pres_refresh_watchers(pres, event, type, NULL, NULL);
}

int _api_pres_refresh_watchers_file(str *pres, str *event, int type, str 
*file_uri, str *filename)
{
        return pres_refresh_watchers(pres, event, type, file_uri, filename);
}
```

Plus you consider others' needs in future and not just your own right now.

Just my opinion - perhaps others think differently.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1417#issuecomment-361693961
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to