[sr-dev] Fwd: [SR-Users] bug in authdb_mod ??

jay binks jaybinks at gmail.com
Thu Mar 6 12:17:38 CET 2014


Are you able to backport this please ?
or will it make it into your new build anyway ?


On 7 February 2014 01:09, Daniel-Constantin Mierla <miconda at gmail.com>wrote:

>  I pushed a rework-ed patch. Can you try with the patch from commit:
>
> -
> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3cde37cf10795b4eb785ffd141a8b28e64864f5d
>
> I don't use cassandra, so didn't test it. If all goes fine with the tests,
> then I can backport.
>
> Cheersm
> Daniel
>
>
>
> On 06/02/14 05:30, jay binks wrote:
>
> So I posted this to the user list in December, and got nowhere..
>
>  Can someone familiar with db_cassandra review my patch ( possibly clean
> this up and commit it )
>
>
>  # git diff dbcassa_base.cpp
> diff --git a/modules/db_cassandra/dbcassa_base.cpp
> b/modules/db_cassandra/dbcassa_base.cpp
> index e9d3a32..155221d 100644
> --- a/modules/db_cassandra/dbcassa_base.cpp
> +++ b/modules/db_cassandra/dbcassa_base.cpp
> @@ -439,6 +439,7 @@ ColumnVecPtr cassa_translate_query(const db1_con_t*
> _h, const db_key_t* _k,
>         int key_len=0, seckey_len = 0;
>         int no_kc, no_sec_kc;
>         dbcassa_table_p tbc;
> +       char pk[255];
>
>         /** Lock table schema and construct primary and secondary key **/
>         if(_k) {
> @@ -495,8 +496,12 @@ ColumnVecPtr cassa_translate_query(const db1_con_t*
> _h, const db_key_t* _k,
>                 } else { /* the table doesn't have any secondary key
> defined */
>                         if(_c) {
>                                  for(int i=0; i< _nc; i++) {
>  -
> sp.column_names.push_back(_c[i]->s);
>  -                                       LM_DBG("Query col: %s\n",
> _c[i]->s);
>  +                                       sprintf(pk, "%.*s", _c[i]->len,
> _c[i]->s );
>  +                                       sp.column_names.push_back( pk);
> +
> //sp.column_names.push_back(_c[i]->s);
> +                                       LM_DBG("Query col: %s\n", pk );
> +                                       //LM_DBG("Query col: %s\n",
> _c[i]->s);
>  +                                       LM_DBG("JAY Query col: %.*s\n",
> _c[i]->len, _c[i]->s);
>                                 }
>                                  LM_DBG("get %d columns\n", _nc);
>                                  sp.__isset.column_names = true; // set
>
>
>
>
>  yea I know I left crap in there, but it gives you an idea... also...
> yea pk is a crap name... copy paste... and I havnt given any thought to
> the size 255 ,  but thats probably fairly safe and anything smaller might
> not be so safe.
> ( unless there is a limit elsewhere I should observe )
>
>  Jay
>
>
> _______________________________________________
> sr-dev mailing listsr-dev at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>


-- 
Sincerely

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140306/2d080041/attachment.html>


More information about the sr-dev mailing list