|
|
|
@ -81,21 +81,26 @@ int persist_sqlite__client_remove_cb(int event, void *event_data, void *userdata
|
|
|
|
|
ed->client_id, (int)strlen(ed->client_id), SQLITE_STATIC) == SQLITE_OK){
|
|
|
|
|
|
|
|
|
|
ms->event_count++;
|
|
|
|
|
sqlite3_step(ms->subscription_clear_stmt);
|
|
|
|
|
rc = sqlite3_step(ms->subscription_clear_stmt);
|
|
|
|
|
sqlite3_reset(ms->subscription_clear_stmt);
|
|
|
|
|
if(rc == SQLITE_DONE){
|
|
|
|
|
rc = MOSQ_ERR_SUCCESS;
|
|
|
|
|
}else{
|
|
|
|
|
rc = MOSQ_ERR_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(sqlite3_bind_text(ms->client_remove_stmt, 1,
|
|
|
|
|
ed->client_id, (int)strlen(ed->client_id), SQLITE_STATIC) == SQLITE_OK){
|
|
|
|
|
|
|
|
|
|
ms->event_count++;
|
|
|
|
|
rc = sqlite3_step(ms->client_remove_stmt);
|
|
|
|
|
sqlite3_reset(ms->client_remove_stmt);
|
|
|
|
|
if(rc == SQLITE_DONE){
|
|
|
|
|
rc = MOSQ_ERR_SUCCESS;
|
|
|
|
|
}else{
|
|
|
|
|
rc = MOSQ_ERR_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sqlite3_reset(ms->client_remove_stmt);
|
|
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
|
|
|
|