Skip to content

Commit

Permalink
Fix mac address index
Browse files Browse the repository at this point in the history
When adding node id I forgot to update the MAC index.
  • Loading branch information
kristrev committed Aug 31, 2019
1 parent ef02ac9 commit 79acdac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion metadata_writer_inventory_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ static int32_t md_inventory_execute_insert_usage(struct md_writer_sqlite *mws,
struct md_conn_event *mce,
uint64_t date_start)
{
uint8_t interface_id_idx = 1;
uint8_t interface_id_idx = 2;
sqlite3_stmt *stmt = mws->insert_usage;
const char *no_iccid_str = "0";
char *sql_stmt_str;

sqlite3_clear_bindings(stmt);
sqlite3_reset(stmt);
Expand Down Expand Up @@ -277,6 +278,13 @@ static int32_t md_inventory_execute_insert_usage(struct md_writer_sqlite *mws,
return SQLITE_ERROR;
}

sql_stmt_str = sqlite3_expanded_sql(stmt);

if (sql_stmt_str) {
META_PRINT_SYSLOG(mws->parent, LOG_ERR, "Insert query: %s\n", sql_stmt_str);
sqlite3_free(sql_stmt_str);
}

return sqlite3_step(stmt);
}

Expand Down

0 comments on commit 79acdac

Please sign in to comment.