Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-03 Thread henningw
Merged #1467.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#event-1502611789___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-03 Thread henningw
Reopened #1467.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#event-1502607969___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-03 Thread henningw
Merged and closed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#issuecomment-370166411___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-03 Thread henningw
Closed #1467.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#event-1502607188___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-03 Thread henningw
henningw approved this pull request.

Thank you for the additional checks!




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#pullrequestreview-100981714___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-02 Thread Hugh Waite
@que273 pushed 1 commit.

53e1326  sqlops: Add NULL parameter check to C/KEMI API functions


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/1467/files/401838544fde5a11fbdf2b17f21a59ca34cc3db2..53e1326f25e57491343a86a52b7ddf7919acce12
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-02 Thread Hugh Waite
sql_get_result does not currently check the 'name' parameter and will crash in 
core_case_hash if this is NULL. This is also true for sql_get_connection and 
sql_init_con. However, these three functions are only called from within the 
sqlops module.
I will add a check to the C-API/KEMI wrapper functions that call them 
(sqlops_do_query, sqlops_get_value, sqlops_is_null, etc.)? Is it needed inside 
sql_get_result as well?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#issuecomment-369868083___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-02 Thread henningw
Forget my previous comment - I think we should add a null check to sql_do_query 
as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#issuecomment-369850597___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] sqlops: sqlops_do_query - Make result parameter optional in C API (#1467)

2018-03-02 Thread henningw
Hello Hugh, thank you for the pull request. Wouldn't make sense to move the 
null check to the beginning of the function? Otherwise sql_get_result would 
call with a null before your check.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1467#issuecomment-369850419___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev