rem: keys[0]=domain_domain_col; cols[0]=domain_domain_col;
add: keys[0]=domain_col; cols[0]=domain_col;
context: int is_domain_local(str* _host){	if (db_mode == 0) {		db_key_t keys[1];		db_val_t vals[1];		db_key_t cols[1]; 		db_res_t* res;		keys[0]=domain_domain_col;		cols[0]=domain_domain_col;				if (db_use_table(db_handle, domain_table) < 0) {			LOG(L_ERR, "is_local(): Error while trying to use domain table\n");			return -1;		}		VAL_TYPE(vals) = DB_STR;		VAL_NULL(vals) = 0;				VAL_STR(vals).s = _host->s;		VAL_STR(vals).len = _host->len;		if (db_query(db_handle, keys, 0, vals, cols, 1, 1, 0, &res) < 0) {			LOG(L_ERR, "is_local(): Error while querying database\n");			return -1;		}		if (RES_ROW_N(res) == 0) {			DBG("is_local(): Realm \'%.*s\' is not local\n", 			    _host->len, _host->s);			db_free_query(db_handle, res);			return -1;		} else {			DBG("is_local(): Realm \'%.*s\' is local\n", 			    _host->len, _host->s);			db_free_query(db_handle, res);			return 1;		}	} else {		return hash_table_lookup (_host->s, _host->len);	}			}