[sr-dev] [kamailio/kamailio] dispatcher: add attrs param to rpc 'add' call (#2336)

Daniel-Constantin Mierla notifications at github.com
Thu May 28 08:29:05 CEST 2020


@miconda commented on this pull request.



>  
 	flags = 0;
 
-	if(rpc->scan(ctx, "dS*d", &group, &dest, &flags) < 2) {
+	if(rpc->scan(ctx, "dS*d", &group, &dest, &flags, &attrs) < 3) {

The above condition needs some update. Because attrs is optional, then it is still fine to go on with return code 2 (which represents the number of items/params scanned).

Probably return code has to be stored in a variable, e.g., then if ret<2 is error, if ret==2 then attrs.s=NULL and attrs.len=0 (or attrs=STR_NULL when declared).

-- 
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/2336#discussion_r431608432
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200527/55afb38d/attachment-0001.html>


More information about the sr-dev mailing list