More name info issues.

This commit is contained in:
Cory McWilliams 2024-05-11 10:53:21 -04:00
parent 69fccd56d3
commit 47838d5e48

View File

@ -431,15 +431,15 @@ static void _tf_ssb_getIdentityInfo_work(tf_ssb_t* ssb, void* user_data)
int r = SQLITE_OK; int r = SQLITE_OK;
while ((r = sqlite3_step(statement)) == SQLITE_ROW) while ((r = sqlite3_step(statement)) == SQLITE_ROW)
{ {
const char* identity = (const char*)sqlite3_column_text(statement, 0);
const char* name = (const char*)sqlite3_column_text(statement, 1);
for (int i = 0; i < request->count; i++) for (int i = 0; i < request->count; i++)
{ {
const char* identity = (const char*)sqlite3_column_text(statement, 0); if (!request->names[i] && strcmp(request->identities[i], identity) == 0)
const char* name = (const char*)sqlite3_column_text(statement, 1);
if (strcmp(request->identities[i], identity) == 0 && !request->names[i])
{ {
request->names[i] = tf_strdup(name); request->names[i] = tf_strdup(name);
break;
} }
break;
} }
} }
} }