This also effects when moving a gateway from one profile to the other.
What this changes
- Do not remove a gateway from the hash unless it matches the profile.
- Fix `sofia profile <ProfileName> killgw <GatewayName>` to delete the gateway by using the qualified name `ProfileName::GatewayName` so we only delete a gateway on profile `ProfileName`.
- When loading/reloading a gateway, add it with the unqualified name to the hash if there is no other gateway with that name on another profile. (for example when `profileA` and `profileB` have a gateway `gw1`, `profileA` is first in the list, so we add `gw1` from `profileA` to the hash qualified and unqualified. for `profileB` it is added only qualified. Now, `sofia profile profileA killgw gw1` removes the gateway from `profileA`, so executing `sofia profile profileB startgw gw1` will now add `gw1` from `profileB` to the hash using the unqualified name).
- Fix `sofia profile ProfileName register|unregister GatewayName` to be profile specific.
- Ensure throughout sofia whenever we lookup a gateway related to an ongoing call, to also check the profile that it matches.
The added method, query_rows, allows the retrieval of rows from a database without the need for a callback function, it fetches the rows and returns 3 arguments as show below.
```
lua
local success, rows, err = dbh:query_rows(sql)
```
This function performs better with large number of rows. Test results below 50k rows returned.
dbh:query(sql, callback) - 0.335949 seconds
dbh:query_rows(sql) - 0.253178 seconds
Introduced a configurable limit on the number of arguments for mod_curl functions with a default of 30. Adjusted the code to handle scenarios exceeding this limit by logging an error and returning failure. This improves flexibility and prevents potential overflow issues.
Extend the database module to handle the PGRES_TUPLES_CHUNK case introduced in PostgreSQL 17. This ensures compatibility with the latest PostgreSQL version and prevents potential issues when processing query results.