Commit Graph

673 Commits

Author SHA1 Message Date
paulc 0883e02e29 Added API and -Dd command line parameter to disable taking the global mutex when (un)locking a Mutex or Semaphore.
This provides better performance and reduces mutex contention on expense of some thread safety and ease of debugging.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3801 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-09 19:52:51 +00:00
paulc 9107954c10 Added method to (re)assign a list to an iterator and a method to clear the iterator.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3799 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-05 17:25:29 +00:00
paulc fd39111d4f Added static method to check at runtime if Socket::select() is efficient.
Use select() on the MGCP reader socket if it worths.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3798 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-05 16:08:11 +00:00
paulc 82ad37c3af Detect if available and use poll() instead of select() on sockets.
This save a lot on performance by not FD_ZEROing large sets.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3797 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-05 15:06:57 +00:00
marian a17323af75 Avoid output buffer re-alloc if needed size don't change in various data translators.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3769 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-02 13:59:02 +00:00
marian ba08ab437b The SimpleTranslator is now keeping source and destination formats across Consume calls: avoid repetitive String alloc.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3768 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-02 13:43:03 +00:00
marian be61cac29b Added MutexPool class implementing a fixed size array of mutexes. Replaced the global mutex protecting the RefObject counter changes with a mutex pool.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3760 acf43c95-373e-0410-b603-e72c3f656dc1
2010-11-01 14:54:53 +00:00
marian 467e2897f1 Lock DataSource while its translator is set. Safely retrieve the translator when a chain is detached.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3759 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-29 08:41:32 +00:00
marian a38fa1ba85 Added global mutex used to protect DataConsumer's source pointer changes.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3758 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-27 16:03:44 +00:00
paulc d5d51a5ab2 Emit a chan.connected notification message when a Channel was just connected.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3755 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-26 15:48:36 +00:00
paulc eb82c7d2ac Optimized SocketAddr::assign to avoid assigning same address.
Saves many malloc+free+sprintf calls especially in RTP streams.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3712 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-12 15:39:04 +00:00
paulc 9ea9ed1782 Added a separate constant for the minimum settable debug level threshold.
This fixes a display bug caused by Rev 3680, FAIL and GOON were displayed like CONF.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3710 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-12 09:27:13 +00:00
paulc 644065b54f Add O_LARGEFILE to the log file flags to allow it to grow more than 2GB on systems that support it.
Apart from the initial O_APPEND the log file is never seek()ed anyway.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3705 acf43c95-373e-0410-b603-e72c3f656dc1
2010-10-11 11:00:35 +00:00
paulc 09144d722d Added a new debug level DebugConf with text CONF for reporting configuration problems.
Limit the minimum debug level so CONF and GOON are always visible besides FAIL.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3680 acf43c95-373e-0410-b603-e72c3f656dc1
2010-09-29 15:28:27 +00:00
paulc 3aeca0c8b8 Fortified codec chain destruction against invalid accesses.
Even if concurrent destruction can still happen it results in no more than a warning message.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3667 acf43c95-373e-0410-b603-e72c3f656dc1
2010-09-23 14:37:48 +00:00
paulc 266bf4cf0f Allow a circular offset of the items in a ListIterator so all elements are iterated but starting with a specific one.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3616 acf43c95-373e-0410-b603-e72c3f656dc1
2010-09-01 07:50:57 +00:00
marian 2518fbfe8c Added abstract Compressor class for data (de)compression.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3423 acf43c95-373e-0410-b603-e72c3f656dc1
2010-07-09 10:20:08 +00:00
marian 61e91c441f Removed dangerous (too complex) macro.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3419 acf43c95-373e-0410-b603-e72c3f656dc1
2010-07-06 13:13:00 +00:00
marian 803fcb09fb Constified static Strings declared in functions to make sure they are safely initialized.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3418 acf43c95-373e-0410-b603-e72c3f656dc1
2010-07-06 12:56:25 +00:00
marian fe28900209 Made locally used functions static to avoid namespace pollution.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3417 acf43c95-373e-0410-b603-e72c3f656dc1
2010-07-06 12:20:03 +00:00
paulc 619f781b8b Constified some more Regexps, speeds up URI parsing and fixes compiling in Windows.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3393 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-21 16:58:26 +00:00
paulc 682c4c9d2a Use static const Regexps wherever possible to speed up code.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3391 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-17 11:38:46 +00:00
paulc 1779a3b154 Made the private pointer of Regexp mutable so compile() and matches() can be made const.
Part of a patch by Allan Sandfeld Jensen.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3390 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-17 11:36:52 +00:00
paulc d8b784be12 Report the number of threads that are to be cancelled at shutdown.
Protect against not cancelling threads if compiling with SOFT_WAITS <= 0.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3386 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 13:45:54 +00:00
paulc a412a081e2 Improve shutdown behavior by first soft cancelling all threads and waiting a while for them to exit.
Based on a patch by Allan Sandfeld Jensen.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3385 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 12:23:23 +00:00
paulc 91ca986d14 Added a broadcast flag to class Message so it can continue dispatching even if one of the handlers returned true.
Use the broadcast flag in the messages emitted by the engine.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3384 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 11:42:52 +00:00
paulc a6a00f9660 Added an engine.stop message that modules can use to keep engine running while cleaning up.
The engine emits engine.stop every second (but at most 5 times) and shuts down only if the message returned false.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3381 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 09:05:08 +00:00
paulc 65c34956b5 Engine improvments by Allan Sandfeld Jensen: add the "nodename" parameter to engine generated messages.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3380 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 08:46:47 +00:00
paulc a5a06cb5ad Supervisor improvments by Allan Sandfeld Jensen: display child's normal exit code, send SIGABRT to an unresponsive child if -C was used.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3379 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-16 08:35:42 +00:00
paulc 78d100265f Got rid of some long standing conversion warning by providing the proper casts.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3377 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-11 18:07:17 +00:00
paulc 616e868e00 Use the sdbm string hashing algorithm from http://www.cse.yorku.ca/~oz/hash.html
Patch recommended by Allan Sandfeld Jensen.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3372 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-11 12:29:00 +00:00
paulc d95cb2fec6 Spelling cleanup of a very common error: Retrive -> Retrieve
git-svn-id: http://yate.null.ro/svn/yate/trunk@3371 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-11 11:25:10 +00:00
paulc dda44fe281 Made a lot of constructors explicit to prevent undesirable automatic conversions.
Fixed two undesirable automatic conversions exposed by this change.


git-svn-id: http://yate.null.ro/svn/yate/trunk@3366 acf43c95-373e-0410-b603-e72c3f656dc1
2010-06-08 15:25:05 +00:00
paulc 63e386addb Include the node name in the engine status and the default rmanager greeting.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3352 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-28 17:07:49 +00:00
marian 6b4ae1e4d5 Added method used to set an element's image.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3338 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-21 11:43:26 +00:00
marian dad8ca1f34 Add existing accounts to menu. Remove an account from menu when deleted.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3336 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-20 15:15:31 +00:00
marian 8b954ffe33 Added methods used to build and remove menus at runtime.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3335 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-20 15:14:31 +00:00
marian 6ea274c2b4 Added client option used to open the account add window on startup if the accounts list is empty. Reset it if the user closes the window before terminating the application.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3334 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-19 13:26:57 +00:00
marian fb8856ebb9 Avoid resetting account add/edit window contents if already visible.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3332 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-19 12:29:04 +00:00
marian cdd8e0abe4 Handle 'quit' action in DefaultLogic.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3331 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-19 11:29:37 +00:00
paulc 1bf3f67209 Fixed a missing parameter.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3323 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-13 17:17:42 +00:00
marian 401917ee8e Fixed chan.dtmf sending: use the active channel if none specified.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3318 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-13 13:34:42 +00:00
marian 24ff753ac9 DefaultLogic is now waiting for engine start notification to login startup accounts.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3313 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-12 08:45:40 +00:00
marian 73abc8bd87 Postpone the engine.start message to be processed in the client's thread.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3312 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-12 08:01:37 +00:00
marian 2ac3483b36 Hide account and contact edit windows before exiting.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3309 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-11 14:45:07 +00:00
marian 29b145351e DefaultLogic is now using an accounts list for accounts and contacts management. Fixed account and contact add/edit bugs. Calls log is now shown using a common table for incoming and outgoing. Fixed DefaultLogic resource.notify and user.roster processing.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3308 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-11 14:25:41 +00:00
marian 74e1d159cd Return found configuration section when asked to check or create one.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3303 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-10 14:02:21 +00:00
marian 5e77ad5c72 Use the new version of NamedList::addParam() to avoid adding empty values.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3282 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-04 11:17:46 +00:00
paulc 64dae801eb Made possible to automatically skip adding an empty value to a NamedList.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3281 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-04 10:35:52 +00:00
marian bd4ee4155b Make sure the account's resource pointer is always valid.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3280 acf43c95-373e-0410-b603-e72c3f656dc1
2010-05-04 10:22:34 +00:00