aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2006-10-20minor comment changes, code rearrangement and field renamingrizzo1-29/+27
to minimize diffs with future modifications. The current implementation is problematic for the following reasons: + all insertions are O(N) because the event list does not have a tail pointer; + there is only a single lock protecting both session and users queues. + the implementation of the queue itself is not documented. I think i have figured it out, more or less, but am unclear on whether there is proper locking in place The rewrite (which i have working locally) uses a tailq so insertions are O(1), separate locks for the event and session queues, and has a documented implementation so hopefully we can figure out if/where bug exist. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45753 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20Let's repair the SIP attack shield :-)oej1-24/+51
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45743 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20Doxygen correctionsoej1-33/+33
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45742 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19This new function, VERSION(), created via bug report 8176, may help dialplan ↵murf1-0/+118
programmers in the future. In the meantime, they can use the algorithm I outline on the bug report notes; If anyone invents something better, I'd hope they post it git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45724 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19astman was slightly weirding out over the new Dial and Newcallerid eventsmurf1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45712 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19more fixes to comments and very minor code rearrangement.rizzo1-4/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45696 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Merged revisions 45694 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45694 | file | 2006-10-19 13:24:40 -0400 (Thu, 19 Oct 2006) | 2 lines Let's remember to unregister JabberStatus too (issue #8184 reported by jmls) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45695 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Merged revisions 45692 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r45692 | file | 2006-10-19 13:19:47 -0400 (Thu, 19 Oct 2006) | 10 lines Merged revisions 45691 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r45691 | file | 2006-10-19 13:16:37 -0400 (Thu, 19 Oct 2006) | 2 lines Respect language selection when seeing if the file exists (issue #8178 reported by mnicholson) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45693 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19implement proper XML/HTML formatting of multiple messagesrizzo1-9/+4
(e.g. the result of waitevent). Also fix some comments. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45690 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Merged revisions 45678 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45678 | file | 2006-10-19 12:03:09 -0400 (Thu, 19 Oct 2006) | 2 lines If the jitterbuffer is forced on then we can't partially bridge (reported by wangster on #asterisk-dev) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45679 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19move a large block out of do_monitor() and into a function,rizzo1-48/+54
to improve readability. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45668 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19+ move the definition of netlock as it was not related to therizzo1-3/+6
comment just above; + decouple the struct definition and variable declaration (iflist); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45658 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19more documentation of data structure and functions.rizzo1-25/+34
Of interest: + ast_get_manager_by_name_locked() is now without the ast_ prefix as it is a local function; + unuse_eventqent() renamed to unref_event(), and returns the pointer to the next entry. + marked with XXX a couple of usages of unref_event() because i suspect we are addressing the wrong entry. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45648 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Cleaning up... Removing duplicate (again)oej1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45647 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19restore freeing of threadstorage objects without custom cleanup functionskpfleming2-13/+17
allow custom threadstorage init functions to return failure use a custom init function for chan_sip's temp_pvt, to improve performance a bit git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45634 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Merge fix to not leak the stringfields of a thread speicif sip_pvt. This alsorussell1-1/+12
includes the fix not to leak the actual sip_pvt. Merged revisions 45622 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45622 | russell | 2006-10-18 20:59:51 -0400 (Wed, 18 Oct 2006) | 2 lines Don't leak the actual thread-specific sip_pvt struct ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45624 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19Extend the thread storage API such that a custom initialization function canrussell10-29/+49
be called for each thread specific object after they are allocated. Note that there was already the ability to define a custom cleanup function. Also, if the custom cleanup function is used, it *MUST* call free on the thread specific object at the end. There is no way to have this magically done that I can think of because the cleanup function registered with the pthread implementation will only call the function back with a pointer to the thread specific object, not the parent ast_threadstorage object. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45623 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18silent warning from a debugging message (which will go awayrizzo1-1/+1
soon, anyways) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45611 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Just for Nicholson - here's an option, C, to Meetme that will allow it to ↵file2-4/+15
continue in the dialplan if the person is kicked out. (issue #7994 reported by mnicholson with mods by myself) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45610 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18remove trailing whitespacerizzo1-90/+91
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45599 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18ouch! remember to unlink temporary files once done with them.rizzo1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45598 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18+ move output_format variables in the http section of the file;rizzo1-34/+41
+ more comments on struct mansession and global variables; + small improvements to the session matching code so it supports multiple sessions from the same IP git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45597 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Merged revisions 45595 via svnmerge from file1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45595 | file | 2006-10-18 17:03:34 -0400 (Wed, 18 Oct 2006) | 2 lines Don't modify things if we are using vfork as this is very bad and may cause unexpected behavior (issue #7970 reported by Nick Gavrikov) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45596 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18another bunch of comments on the data structures.rizzo1-39/+31
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45583 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18despite the large changes, this commit only moves functionsrizzo1-291/+341
around so that functions belonging to the same group are close to each other. At the beginning of each group i have added a bit of documentation to explain what the group does and what is the typical flow - basically, all i have learned by code inspection over the past few days should be documented for you to read. I have not put many doxygen annotations just because i am not sure what are the proper ones. Hopefully some doxygen experts will jump in. Next on the plate: try to figure out how "struct eventqent" are supposed to work. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45582 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18more comment and formatting fixes, small simplificationsrizzo1-51/+66
to functions get_input() and session_do() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45572 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18rizzo compile then commit, maybe even run it too ^_^mogorman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45571 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18comment and cleanup the main thread.rizzo1-26/+31
On passing, fix a bug: close the socket if the allocation of a structure for the new session fails. (the bugfix is a candidate for 1.4) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45561 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18create a new (internal, for the time being) function astman_start_ack()rizzo1-70/+45
to start manager responses that need further lines. This removes a lot of duplicate code from the various handlers that at the moment build an ActionID string themselves. Once settled, the function should move to manager.h so it can be used by other files (chan_agent, chan_iax2, chan_sip, chan_zap, res_jabber and app_queue). I am not totally clear if there is a preferred position for the ActionID: line in a message. Some instances put it at the end, but one would argue that it is preferable to have it at the beginning. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45551 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18more indentation cleanup from previous commits,rizzo1-76/+76
and remove the "busy" field from struct mansession as it was not used correctly anyways. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45541 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18create proper handlers for "Challenge" and "Login" actions,rizzo1-53/+53
rather than use inline code for them. Things are more readable this way, and also error processing is more consistent. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45540 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18fix indentation from a commit of a couple of days agorizzo1-33/+32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45530 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18another batch of simplifications to authenticate()rizzo1-65/+70
(they are committed a bit at a time so it is easier to revert them in case we find a bug at a later time). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45529 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Remove duplicate declarations...oej1-6/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45528 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18remove unused fields and unimplemented options.rizzo2-14/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45518 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18first pass as simplifying authenticate(), avoiding whitespace changesrizzo1-14/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45516 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18more code simplificationsrizzo1-43/+34
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45515 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18simplify ast_strings_to_maskrizzo1-28/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45505 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18add a comment to remember that a block of code isrizzo1-0/+6
completely redundant. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45495 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18+ move the enum declaration for output formats near the headrizzo1-22/+48
of the file, so it can be used from more places; + make the declaration of contenttype[] more robust; + remove the wrappers around __xml_translate(), since they were used only in one place, and rename to xml_translate(). This allows for a bit of simplifications. + document the output produced by the above function. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45485 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18merge xml_translate() and html_translate() into one function sincerizzo1-57/+28
they do similar things. Add a small form on top of the html output so request like http://foo:8088/asterisk/manager will suggest you what to do. Note: i suspect there is still a bug somewhere in the session matching code, as sometimes you have to login twice in order for the following commands to be recognised. Apart from this, the cli now is basically usable from a web form! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45475 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18introduce uri_decode() so that '+' are translated into ' 'rizzo1-1/+12
(e.g. browsers do this when they encode input strings from a form). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45474 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18various code simplifications to reduce nesting depth,rizzo1-128/+127
minor optimizations to avoid extra calls of strlen(), and some variable localization. One feature worth backporting is the move of ast_variables_destroy() to a different place in handle_uri() to avoid leaking memory in case a uri is not found. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45463 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Merged revisions 45452 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45452 | file | 2006-10-17 23:02:08 -0400 (Tue, 17 Oct 2006) | 2 lines Don't segfault if you're using a channel driver that doesn't turn RTCP on ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45453 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Merged revisions 45441 via svnmerge from russell1-22/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45441 | russell | 2006-10-17 22:41:36 -0400 (Tue, 17 Oct 2006) | 7 lines Don't attempt to access private data members of the pthread_mutex_t object, because this does not work on all linux systems. Instead, just access the reentrancy field in the ast_mutex_info struct when DEBUG_THREADS is enabled. If DEBUG_CHANNEL_LOCKS is enabled, the developer probably has DEBUG_THREADS on as well. (issue #8139, me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45442 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-18Merged revisions 45439 via svnmerge from russell1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45439 | russell | 2006-10-17 22:19:07 -0400 (Tue, 17 Oct 2006) | 2 lines update entry to reboot a snom phone (issue #7850, pnlarsson) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45440 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17As per bug 6779, this patch is now applied to trunk; while I was at it, I ↵murf1-5/+14
corrected a reference to a CLI command, to follow the new regime. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45426 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17Merged revisions 45410 via svnmerge from kpfleming1-0/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45410 | kpfleming | 2006-10-17 17:31:54 -0500 (Tue, 17 Oct 2006) | 2 lines add a project-specific script to be used during release preparation ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45411 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17Merged revisions 45408 via svnmerge from kpfleming5-38/+58
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines optimize the 'quick response' code a bit more... no more malloc() or memset() for each response expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45409 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17Warning be gone!file1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45398 f38db490-d61c-443f-a65b-d21fe96a405b