diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-03 18:51:41 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-05-03 18:51:41 +0000 |
commit | c5f4332a6af2672b51aae1d84270c0a216ceb39a (patch) | |
tree | db9b1922606c9d835c3a1f4f32a0da4df5438b1e /res | |
parent | a3eb082f3c884428eb0af6e592c9c8c0d14c4f90 (diff) |
Merged revisions 316215 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r316215 | dvossel | 2011-05-03 13:49:48 -0500 (Tue, 03 May 2011) | 9 lines
Fixes a random crash (NULL reference) in res_odbc.c.
(closes issue #19180)
Reported by: pruiz
Patches:
tmp.diff uploaded by pruiz (license 1152)
Tested by: pruiz, seanbright
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316216 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_odbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c index 1af8bbafd..14cf05368 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -1360,7 +1360,7 @@ struct odbc_obj *_ast_odbc_request_obj2(const char *name, struct ast_flags flags if (obj && ast_test_flag(&flags, RES_ODBC_CONNECTED) && !obj->up) { /* Check if this connection qualifies for reconnection, with negative connection cache time */ - if (time(NULL) > class->last_negative_connect.tv_sec + class->negative_connection_cache.tv_sec) { + if (time(NULL) > obj->parent->last_negative_connect.tv_sec + obj->parent->negative_connection_cache.tv_sec) { odbc_obj_connect(obj); } } else if (obj && ast_test_flag(&flags, RES_ODBC_SANITY_CHECK)) { |