{"action":"closed","issue":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/640","repository_url":"https://api.github.com/repos/kamailio/kamailio","labels_url":"https://api.github.com/repos/kamailio/kamailio/issues/640/labels{/name}","comments_url":"https://api.github.com/repos/kamailio/kamailio/issues/640/comments","events_url":"https://api.github.com/repos/kamailio/kamailio/issues/640/events","html_url":"https://github.com/kamailio/kamailio/issues/640","id":156810055,"number":640,"title":"\"flags\" and \"reg_delay\" uacreg columns not read if database lacks DB_CAP_FETCH capability","user":{"login":"AndyJRobinson","id":11933365,"avatar_url":"https://avatars.githubusercontent.com/u/11933365?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyJRobinson","html_url":"https://github.com/AndyJRobinson","followers_url":"https://api.github.com/users/AndyJRobinson/followers","following_url":"https://api.github.com/users/AndyJRobinson/following{/other_user}","gists_url":"https://api.github.com/users/AndyJRobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyJRobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyJRobinson/subscriptions","organizations_url":"https://api.github.com/users/AndyJRobinson/orgs","repos_url":"https://api.github.com/users/AndyJRobinson/repos","events_url":"https://api.github.com/users/AndyJRobinson/events{/privacy}","received_events_url":"https://api.github.com/users/AndyJRobinson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-25T17:45:18Z","updated_at":"2016-05-26T14:35:20Z","closed_at":"2016-05-26T14:35:20Z","body":"In both 4.4.1 and master, the recently added \"flags\" and \"reg_delay\" columns are not read if the database lacks DB_CAP_FETCH capability. uac.reg_dump shows them as some large random values.\r\n\r\nThe issue is in uac_reg.c:uac_reg_load_db().\r\n\r\n`\tif (DB_CAPABILITY(reg_dbf, DB_CAP_FETCH)) {\r\n\t\tif(reg_dbf.query(reg_db_con, 0, 0, 0, db_cols, 0, 12, 0, 0) < 0)`\r\n\r\n... so if the database has DB_CAP_FETCH capability, 12 columns are read; however, if not...\r\n\r\n`\t} else {\r\n\t\tif((ret=reg_dbf.query(reg_db_con, NULL, NULL, NULL, db_cols,\r\n\t\t\t\t\t\t0, 10, 0, &db_res))!=0\r\n\t\t\t\t|| RES_ROW_N(db_res)<=0 )\r\n\t\t{` \r\n\r\nonly 10 columns are read, missing the last two (flags and reg_delay)"}}
{"actor":{"display_login":"miconda"}}