William King
5dfea663cd
build fix for mod_xml_radius
2014-09-04 14:57:20 -07:00
William King
47b7c44db6
Fix a problem where radius channel variables were missing in mod_xml_radius
2014-09-04 14:29:35 -07:00
William King
fddf44426f
Fixing a typo in the radius accounting end condition configuration handling in mod_xml_radius
2014-09-04 13:48:50 -07:00
William King
d06d004055
Adding the ability to add a radius param when a channel variable is not set in mod_xml_radius
2014-08-21 23:17:23 -07:00
William King
7f2f9f8ff2
Silence warning from clang-3.5 dealing with redefining the variable argv which is first defined as a function parameter
2014-08-02 19:47:07 -07:00
William King
47760e2d75
Silence a warning in clang-3.5 dealing with implicit conversion from 64bit to 32bit in a function call to switch_ivr_sleep()
2014-08-02 19:41:44 -07:00
William King
b1f382c67e
CID 1229134: fix small memory leak
2014-07-29 21:42:31 -07:00
William King
d208484a1c
Fixing linefeed for mod_managed
2014-07-21 14:00:55 -07:00
William King
4dcb072f8d
Updating the wiki location, and changing the appropriate links to https from http
2014-07-19 14:47:27 -07:00
William King
985ce5729b
Change to ncwait so that the service start script will block until FS is actually started
2014-06-23 10:03:53 -05:00
William King
7ce2009fad
Fix compiler warning about possibly uninitialized variable in libs/esl
2014-06-02 08:33:05 -07:00
William King
2b0c9a1482
FS-6560 --resolve
2014-05-29 08:37:21 -07:00
William King
11f373d4f2
CID: 1215198 Fix an assignment so that the variable only handles malloc'd data.
2014-05-21 16:28:03 -07:00
William King
c19aa584cc
CID: 1214222
...
sofia_glue_get_url_from_contact to strdup the value so before
overwriting the value signal to sofia that we have finished with the
raw header.
2014-05-16 17:01:03 -07:00
William King
388e119e55
CID: 1214221,1214222
...
sip_header_as_string returns new memory alloc'd on the nua_handle's memory pool. This memory would not be freed until
the handle was destroyed. Since there is no usage of the call-info header after it is added to the event as a header value,
we should make sure to both su_free the sofia returned string, but also more cleanly create the event header value to reduce a strdup.
2014-05-16 16:35:49 -07:00
William King
dc83348b71
Fix build for 31b8b55d0b
2014-05-16 15:36:25 -07:00
William King
7d5434f57c
CID: 1214223-1214230 If sent an invalid registration authentication header with multiple params of the same name, then only use the first of the params instead of leaking memory
2014-05-16 11:50:18 -07:00
William King
bdbefdcc48
CID:1087631 In the unlikely case the sprintf fails, free the memory instead of leak it
2014-05-14 19:56:32 -07:00
William King
ee6f3da9ff
CID: 1211948 fix memory leak of decoded iks message in function parse_plain_auth_message in mod_rayo
2014-05-07 00:44:54 -07:00
William King
2a50bbba68
CID: 1211950 fix memory leak of iksparser in function nlsml_parse in mod_rayo
2014-05-07 00:37:32 -07:00
William King
ad327dffc8
CID: 1211946 fixing uninitialized pointer read in mod_translate
2014-05-07 00:22:56 -07:00
William King
5f3e98beb4
Fix a use after free in a 'theoretical' case in switch_cache_db_persistant_execute_trans_full where the pre_trans_execute statement fails, but SQLSetAutoCommitAttr succeeds
2014-04-30 14:37:17 -07:00
William King
af32ca00e3
Correction to commit 0ba59aa6c2 using the correct variable in tel uri param parsing for mod_sofia
2014-04-29 15:23:24 -07:00
William King
0d8f954e09
fixing commit a710841123 in switch_config
...
Previous commit actually broke the functionality since it was now returning if cfg->path[0] was not null.
Also since cfg->path can never be null, this check can be simplified to only check the first index.
2014-04-28 08:46:48 -07:00
William King
0ba59aa6c2
Expanding on 052638186b to support boolean tel url params in mod_sofia
2014-04-25 13:49:59 -07:00
William King
f27fe7ed08
BNPH-6470 follow up to commit 68d863a179 removing the original line that performed the curl request to avoid a double request in mod_xml_curl
2014-04-25 12:11:09 -07:00
William King
bcc2aa9899
Fixing memory leak that would occur when reloading mod_xml_curl
2014-04-24 09:13:00 -07:00
William King
748b7dea3c
Get rid of a small memory leak when the configs are reloaded in mod_enum
2014-04-16 09:27:34 -07:00
William King
711e49c46a
Don't leak these 4 hash tables when mod_fifo is reloaded
2014-04-08 11:18:23 -07:00
William King
aae1954c07
FS-6442 --resolve
2014-04-08 10:36:36 -07:00
William King
658d938754
Unused return value
2014-04-06 23:49:05 -07:00
William King
b5a7bbec7f
spelling
2014-04-01 20:14:55 -07:00
William King
e0d9d7f0b2
FS-6410 Adding some log lines to mod_sonar so that it is more clear what is happening when the app is sending and detecting pings.
2014-03-29 19:08:24 -07:00
William King
fd38a255f8
FS-6167 --resolve
2014-03-04 13:41:34 -08:00
William King
3d461d7cde
FS-1327 --resolve
2014-03-04 13:09:51 -08:00
William King
138224d816
FS-6303 --resolve
2014-03-04 12:30:14 -08:00
William King
3575a07c40
FS-6271 --resolve Adding support for smoothing the min-cpu-idle by X number of seconds. Adds the cpu-idle-smoothing-depth into the conf/autoload_configs/switch.conf.xml configs with a default value of 30 seconds.
2014-02-26 12:36:50 -08:00
William King
fa92f813b9
FS-5888 --resolve Rather than changing the default behavior I've updated the log line to be more accurate. Also fixed the problem where the delay was being overwritten.
2014-02-23 17:23:04 -08:00
William King
5fb660933d
ESL-82 --resolve
...
Previously any esl_connect_timeout() failures would not return to the calling application the reason for the failure.
This commit now allows for calling applications to know why the connection attempt fails, but it is now the calling
applications responsiblity to call esl_disconnect() on the esl handle after the failure. Failing to call disconnect after
a failed connection attempt would result in memory being leaked.
2014-02-21 14:14:05 -08:00
William King
a3e4b8aad4
FS-6241 applying the patch to the legacy 5.1 mod_lua as well
2014-02-19 15:08:49 -08:00
William King
44bf44e774
FS-5382 --resolve remove the hardcoded timezone.
2014-02-14 14:46:46 -08:00
William King
c537fc6f61
Fixing leak in presense where the contact header doesn't include the fs_path option during a presense subscription
2014-01-22 15:28:24 -08:00
William King
c3711b81c9
If libvlc fails to initialize, then the module should fail to load.
2014-01-22 13:56:22 -08:00
William King
20038230d4
This was in the wrong section. Should be setting it on the auth_invite, not the auth_registration.
2013-11-20 11:12:48 -08:00
William King
40c1053221
Fixing printf arg mismatch
2013-10-28 17:01:13 -07:00
William King
9ce66748af
Minor code duplicatation removal.
2013-10-28 16:56:50 -07:00
William King
0b9e01be47
FS-5382: Adding a secondary time format thanks to Buklov.
2013-10-24 23:40:40 -07:00
William King
e0054af96f
Fixing a use after free
2013-10-17 22:27:34 -07:00
William King
00c46450ff
In a case where calls to phones with presence enabled as well as presence disabled,
...
there were cases where the presence enabled calls weren't turning off lights
due to the fact that there were calls still up on the phone(though those calls had presence disabled).
2013-10-15 19:09:39 -07:00
William King
b91d6e430a
How did the use after free not blowup in the last 3 years since it was modified?
2013-09-15 16:19:19 -07:00
William King
aa222c7aea
While sofia does garbage collection, in other locations we still call su_free after calls to sip_header_as_string. So adding it here too since we've finished using the full_contact variable.
2013-09-15 16:05:11 -07:00
William King
3329141e74
Don't risk the double free, use switch_safe_free here same as in ~15 lines.
2013-09-15 15:57:17 -07:00
William King
b73a8fe624
Fix missing return statement.
2013-06-13 10:08:16 -07:00
William King
4219049789
New compiler warning(error). Unused assignment before the pointer is reassigned.
2013-06-12 21:39:27 -07:00
William King
3f2f393a7c
If the addr pointer is NULL, better to check first before using it.
2013-06-12 21:24:06 -07:00
William King
a710841123
This is probably what was intended. If the pointer 'path' is NULL, or if it is not NULL, then the first char should not be '\0'
2013-06-12 21:21:54 -07:00
William King
91c8c8a57b
oops
2013-06-12 21:17:17 -07:00
William King
5026788c4a
Fix minor typo so that the metadata album field can be set.
2013-06-12 17:17:57 -07:00
William King
97918f473b
Since I can't seem to locate what this might be used for, or the more correct solution, I'm going to comment it out for now. If someone can find a better solution so that this functionality would actually work, please advise.
2013-06-12 17:11:36 -07:00
William King
5c60bd6b42
Make sure to cleanup event if there was a failure that caused it not to be fired.
2013-06-12 17:02:15 -07:00
William King
a181ec629f
On the off chance the if statement takes the false branch, let's not leak the memory. again.
2013-06-12 16:46:38 -07:00
William King
5e5af427ef
On the off chance the if statement takes the false branch, let's not leak the memory
2013-06-12 16:41:24 -07:00
William King
e7fa70416d
Previous commit was incorrect. This would correctly handle the memory loss case.
2013-06-06 23:54:07 -07:00
William King
db0d03532d
Fix a possible deadlock scenario in the impossible scenario from the last patch.
2013-05-25 11:06:01 -07:00
William King
7be8184b2a
Redundant code. The if/else block makes more sense than the equivalent in two separate if's.
2013-05-25 07:47:09 -07:00
William King
938699d0b6
Better to not pass tmp_socket to setsockopt if there was an error here creating the socket.
2013-05-25 07:37:28 -07:00
William King
7d531c0966
It's been missing a break there for ~4 years and instead using the 8k max_ms values(the ptime_div value is the same).
2013-05-25 07:15:49 -07:00
William King
f04842d4c8
Cleaning up logically dead code.
2013-05-25 07:02:49 -07:00
William King
acf9a72e3f
This condition should NEVER be hit, but in case the started thread is unable to locate itself in the EVENT_DISOATCH_QUEUE_THREADS array, it's best to return null here and kill the unexpected event thread rather than segfault FS by writing outside of the bounds of the EVENT_DISPATCH_QUEUE_RUNNING array.
2013-05-25 06:51:37 -07:00
William King
5d939b9652
Small off by one error. If the array is of size 144, then an index of 144 inclusive is an error.
2013-05-25 06:41:03 -07:00
William King
12f2f674f9
Let's bit a bit safer when dereferencing pointers.
2013-05-24 20:24:04 -07:00
William King
480407e5f3
Removing logically dead code
2013-05-24 19:59:32 -07:00
William King
9ea90341f7
If there is a problem reading the dictionary file, don't leak memory...
2013-05-24 19:55:50 -07:00
William King
2e6d3a1f2a
Removing unused code
2013-05-24 19:53:26 -07:00
William King
b42ee84933
More explicit and defensive code so if the init fails we know we handling this pointer safely, because rc_config_init will free the pointer if there was a problem, but it will not set the pointer to NULL.
2013-05-24 19:49:33 -07:00
William King
dc4209275d
Another location where mod_rtmp would leak memory.
2013-05-24 19:45:38 -07:00
William King
194e1ae366
Fix improper handling of a double linked list that could have caused a memory leak.
2013-05-24 19:42:17 -07:00
William King
e2d6bc3340
Appears to have been a copy paste error because this doesn't do what the api claims, and it also leaks the reference to the new node.
2013-05-24 19:35:56 -07:00
William King
f3fd94b3e5
Fixing a memory leak. name needs to be freed since it's being strdup'd lower.
2013-05-24 19:31:26 -07:00
William King
15f43bac09
FS-5440: don't assert on bad input rtmp data
2013-05-22 12:38:23 -07:00
William King
50e2098be1
Add mod_xml_radius to the modules list, though disabled by default.
2013-05-18 20:49:51 -07:00
William King
b4209ca93b
Theoretical memory leak where if attr_init failed, then check would have still been malloc'd but not used.
2013-05-18 20:42:03 -07:00
William King
e2ea6e58c8
Minor code cleanup. calling va_start without calling va_end doesn't leak does it? Either way, it's fixed now.
2013-05-18 20:15:55 -07:00
William King
9ace496fe3
full_contact must be freed by sofia. There isn't a chance of this having blown anything up, but Coverity is right that this should be initialized with NULL to be safe against future refactors.
2013-05-18 19:13:18 -07:00
William King
ef1bf8e34a
Was causing a very small leak on naptr lookups. Upon review just happened to be a typo missing a bang.
2013-05-18 17:50:50 -07:00
William King
508fb78e94
My bad. some how a make didn't catch this issue after a cleanup refactor. In this instance buf is being treated as an 8 byte number, not a pointer.
2013-05-18 17:46:13 -07:00
William King
291244c099
Coverity reported an Uninitialized pointer read. Upon further digging it appears that there is a code path where incoming packets can come in out of order, so this section of code tries to see if it can find the missed packets. As per FS-5202 there is a case where under heavy load the packet exists, and has most of the packet parsed, but still has a NULL pointer for the packet buffer. These two lines would at least help detect the edge case.
2013-05-18 17:34:16 -07:00
William King
45803e38e7
Edge case for when you are subscribing to presence on a valet parking lot. In which case there would be a small leak.
2013-05-18 17:06:54 -07:00
William King
d27a95a50e
Possible leak if someone were to try and add extra headers to a channel that had either an inbound info on that session or the session were to be deflected. I don't see a way that these extra headers could be added outside of a C module subscribing to the session states, but just to make sure I'm adding these so that just like other extra header locations it's cleaned up.
2013-05-18 17:00:41 -07:00
William King
f718a0572f
Alice meet rabit hole. There is a leak here on every invite that comes back from a status 180 when the other side is not FS, but you have presence enabled. Thanks to Coverity scan for location this condition. This 'might' not have been leaking if sofia was automatically freeing this when the sofia object was destroyed, but all other locations where sip_header_as_string where called they were all followed by a su_free, so I assume not.
2013-05-18 16:35:03 -07:00
William King
f519ad195a
If the mod_sofia global presense hash is null, then make sure to free the matches variable before going to done.
2013-05-18 16:05:40 -07:00
William King
09553f424a
FS-5443: --resolve leaked because the JS api's copy and return new malloc'd pointers.
2013-05-18 15:47:01 -07:00
William King
7f3f4855a6
When message events were added, the debug field name was overlooked. This would have only been hit when debug level was above 'DEBUG1' and at that point it would have incorrectly chosen debug display names.
2013-05-18 15:10:44 -07:00
William King
4fcefab0d0
Minor typo. User is being passed into this fuction as a long pointer, not a long.
2013-05-18 14:29:59 -07:00
William King
047dc67098
read() does not NULL terminate statbuf, but strstr expects statbuf to be null terminated.
2013-05-18 14:26:40 -07:00
William King
3f06bbd04a
This was writing a null one space to the right, outside of the malloc'd buffer. On further review this uses apr_vsnprintf which always returns null terminated.
2013-05-18 13:38:24 -07:00
William King
8d7aa3ff65
FS-5441: --resolve
2013-05-17 12:39:17 -07:00
William King
58e205ccdb
how...?
2013-05-17 11:36:31 -07:00
William King
cfeb6aaf54
Since there isn't neutral ground, on the rtmp state callback we actually have to force the write lock of the session, but we only need a try lock on removing the session from the rsession->session_hash. This removes a deadlock caused when we had to enforce with locks that the rsession couldn't be destroyed if the FS session was in the middle of a hangup.
2013-05-17 11:36:30 -07:00
William King
f24d1cde3d
Seems the session wasn't coming to the hangup in a locked state.
2013-05-17 11:36:30 -07:00