Skip to content

Conversation

cdevelop
Copy link

@cdevelop cdevelop commented Aug 30, 2025

1 Unfound users are not processed ping status

sip_user_status.status = ping_status;
	sip_user_status.status_len = sizeof(ping_status);
	sip_user_status.contact = sip_contact;
	sip_user_status.contact_len = sizeof(sip_contact);
	sql = switch_mprintf("select ping_status, ping_count, contact from sip_registrations where sip_user='%q' and sip_host='%q' and call_id='%q'",
			     sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host, call_id);
	sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_sip_user_status_callback, &sip_user_status);
	switch_safe_free(sql);

If the user is not found, sip_user_status.count is an uninitialized value.

2 Make SOFIA_REG_UNREACHABLE SOFIA_REG_REACHABLE name and description consistent.

typedef enum {
SOFIA_REG_REACHABLE,
SOFIA_REG_UNREACHABLE,

   SOFIA_REG_INVALID

} sofia_sip_user_status_t;

const char *sofia_sip_user_status_name(sofia_sip_user_status_t status)
{
static const char *status_names[] = { "UNREACHABLE", "REACHABLE", NULL };

if (status < SOFIA_REG_INVALID) {
	return status_names[status];
} else {
	return "INVALID";
}

}

…FIA_REG_UNREACHABLE SOFIA_REG_REACHABLE name and description consistent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant