Commit Graph
18 Commits
Author SHA1 Message Date
Aron Podrigal 5cb74797fe [mod_pgsql] err is now set correctly (dbh:last_error())
New function, `void pgsql_handle_set_error_if_not_set(switch_pgsql_handle_t *handle, char **err)` has been added to mod_pgsql module. This function is now called at several points where an error occurred but *err was not yet set.
2025-01-17 18:51:45 +03:00
Aron Podrigal 96de8fd377 [mod_timerfd] Fixed - continue timer loop after receiving a SIGSTOP
When taking a snapshot of a machine which pauses the process, mod_timerfd exits and FreeSWITCH, causing all channels to wait indefinitely.

Check `errno == EINTR` and continue the timer loop.
2025-01-16 19:13:31 +03:00
Aron Podrigal 083e6ae80f [mod_curl] Fix off-by-one error in argument limit checks.
refs: #2727
2025-01-15 14:03:07 -06:00
Aron Podrigal 4e2e8151b0 [mod_lua] Add Dbh:query_rows
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
2025-01-15 16:30:59 +03:00
Aron Podrigal e359409cae [mod_curl] Increase argument limit and enforce max args constraint
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.
2025-01-15 02:41:23 +03:00
Aron Podrigal 7ed261b27b [mod_pgsql] Add support for PGRES_TUPLES_CHUNK in PostgreSQL 17+
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.
2025-01-15 01:03:49 +03:00
Aron Podrigal 0365becc0d [mod_sofia] Fix fs_path to keep <> so that sofia doesn't put the uri parameters as header parameters. Handle multiple Record-Route / Route and Path headers. 2022-03-25 19:44:25 +03:00
Aron Podrigal 954056c009 [mod_curl] Added PATCH method, add insecure and secure options to verify SSL certs, add proxy option.
* mod_curl: hanlde PATCH method

* mod_curl: verify ssl with an option `insecure` to not verify

* mod_curl: added option to use proxy

* mod_curl: use assert(options)

* [mod_curl] default certificate validation secure/insecure controlled by `validate-certs` config option.

* [mod_curl] Added option secure to force https certs validation
2021-05-10 22:32:48 +03:00
Aron Podrigal fddc6adf8d [mod_pgsql] Use PQcmdTuples() to get number of effected rows to support UPDATE and INSERT without RETURNING. 2021-03-19 01:13:01 +03:00
Aron Podrigal 9619bff685 FS-9758: switch_sql_queue_manager_destroy() avoid null pointer deref
If passed in *qmp is a null pointer return `SWITCH_STATUS_NOOP`
2016-11-21 23:08:16 +00:00
Aron Podrigal d3201c6335 FS-9741: lua expose db err str in freeeswitch.dbh
Added 2 methods to lua freeswitch.Dbh
`last_error()` Returns the error string from the last query or nil.
`clear_error()` clears the error string.
2016-11-21 21:11:03 +00:00
Aron Podrigal f4321a2826 FS-9716: [mod_amqp] Command profile expand params
Expand command profile params "exchange-name, queue-name, binding_key"
This allows dynamic binding based on fs core-uuid (ie, ${core-uuid} ).
2016-11-13 20:38:15 +00:00
Aron Podrigal 2cad5a6940 more whitespace cleanup 2014-12-29 13:24:21 -05:00
Aron Podrigal 6be85bbef5 fixed indentation 2014-12-27 23:44:03 -05:00
Aron Podrigal ff2729c370 cleanup 2014-12-27 23:10:43 -05:00
Aron Podrigal 3e11bf0d22 cond api return -ERR on all syntax errors 2014-12-25 10:34:37 -05:00
Aron Podrigal 625c95a5b1 FS-5945 - cond api improved 2014-12-24 21:22:23 -05:00
Aron Podrigal ca2d2c9b66 FS-5945 - cond api escape special charactars 2014-12-15 14:23:33 -05:00