Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Ovidiu Sas
Hello Alex, More or less, the same thing would apply to "profiles_no_value" with variable support. There is a need for a dynamic way to store those dynamic profiles. Maybe we need to add a parameter to control the size of the profile hash table. -ovidiu On Mon, Jan 11, 2021 at 2:03 PM Alex Balas

Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Alex Balashov
Ovidiu, See my previously expressed concern about data structures underneath. — Sent from my iPad > On Jan 11, 2021, at 1:57 PM, Ovidiu Sas wrote: > > Having support for variables for "profiles_no_value" would be more or > less the same thing as having a "profiles_with_value" with a key > "ge

Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Ovidiu Sas
Having support for variables for "profiles_no_value" would be more or less the same thing as having a "profiles_with_value" with a key "general" or "default". The gain for adding this functionality would be minimal. Regards, Ovidiu Sas On Mon, Jan 11, 2021 at 1:45 PM Muhammad Sohaib wrote: > > T

Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Alex Balashov
Another I would have with using values is performance. Profiles with value are presumably a hash table underneath. If so, wouldn’t stacking a bunch of dialogs under the same value key just result in a small number of long bucket collision chains? — Sent from mobile, with due apologies for brevi

Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Muhammad Sohaib
Thank you Daniel for the explanation. I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number. However, adding support for variables would be a great help. I will give a try to the KS

Re: [SR-Users] Profile name as variable in set_dlg_profile

2021-01-11 Thread Daniel-Constantin Mierla
Hello, I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime. Adding support for variables is possible of course, it would require a bit of c de

[SR-Users] Profile name as variable in set_dlg_profile

2021-01-07 Thread Muhammad Sohaib
Is it possible to insert the current dialog into the profile by using the following way? modparam("dialog", "profiles_no_value", "mytest;xyz") $var(profilename)="xyz"; set_dlg_profile(" $var(profilename) "); Currently it is giving errors and not allowing to use variable instead of static profile