[sr-dev] [kamailio/kamailio] dialog doc does not match code (#1320)

dryvoip notifications at github.com
Sat Nov 18 22:18:35 CET 2017


Documentation:

7.3.  is_in_profile(profile,[value])

Checks if the current dialog belongs to a profile. If the profile supports values, the check can be reinforced to take into account a specific value, if the dialog was inserted into the profile for a specific value. **If no value is passed, only the membership of the dialog in the profile per se is checked.** Note that if the profile does not support values, the value parameter will be silently discarded. 

Code:

```	
static int w_is_in_profile_helper(sip_msg_t *msg,
		struct dlg_profile_table *profile, str *value)
{
	if (profile->has_value) {
		if (value==NULL || value->len<=0) {
			LM_ERR("invalid value parameter\n");
			return -1;
		}
		return is_dlg_in_profile( msg, profile, value);
	} else {
		return is_dlg_in_profile( msg, profile, NULL);
	}
}
```

Expected result: Documentation should be corrected, or even better, code should be updated to perform as documented.

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


More information about the sr-dev mailing list