~vkolesnikov/pbxt/pbxt-maria-windows-app-ver-fixes

« back to all changes in this revision

Viewing changes to src/table_xt.cc

  • Committer: Paul McCullagh
  • Date: 2010-09-01 09:07:43 UTC
  • Revision ID: paul.mccullagh@primebase.org-20100901090743-xa0rh7i368uicvo8
Important to lock this structure before access

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
        ter.ter_tab_id = tab->tab_id;
116
116
        ter.ter_rec_id = rec_id;
117
117
        
 
118
        xt_sl_lock_ns(db->db_error_list, ot->ot_thread);
118
119
        if (!(ter_ptr = (XTTableError *) xt_sl_find(NULL, db->db_error_list, &ter))) {
119
 
                char table_name[XT_IDENTIFIER_NAME_SIZE*3+3];
 
120
                xtBool  ok;
 
121
                char    table_name[XT_IDENTIFIER_NAME_SIZE*3+3];
120
122
 
121
 
                if (!xt_sl_insert(NULL, db->db_error_list, &ter, &ter))
 
123
                ok = xt_sl_insert(NULL, db->db_error_list, &ter, &ter);
 
124
                xt_sl_unlock_ns(db->db_error_list);
 
125
                if (!ok)
122
126
                        return FAILED;
123
127
                xt_tab_set_table_repair_pending(tab);
124
128
                xt_tab_make_table_name(tab, table_name, sizeof(table_name));
128
132
                        (u_llong) rec_id,
129
133
                        not_valid ? "not valid" : "free");
130
134
        }
 
135
        else
 
136
                xt_sl_unlock_ns(db->db_error_list);
131
137
        return OK;
132
138
}
133
139