[sr-dev] [kamailio/kamailio] presence: add API endpoints to update presentity and notify watchers (#1417)

Charles Chance notifications at github.com
Tue Jan 30 19:46:46 CET 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180130/43103997/attachment.html>


More information about the sr-dev mailing list