Added rds_wait_state function in rds-common