[sr-dev] [tracker] Task opened: uac.reg_disable/uac.reg_enable missmatch

sip-router bugtracker at sip-router.org
Tue Oct 21 10:04:30 CEST 2014


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Savolainen Dmitri (snen) 

Attached to Project - sip-router
Summary - uac.reg_disable/uac.reg_enable missmatch
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - There is a   uac.reg_disable/uac.reg_enable  fuction missmatch in UAC module
<code>
[root at sw4 sbin]# ./kamcmd uac.reg_dump
{
	l_uuid: 000105656
	l_username: 000105656
	l_domain: sip.domain2.ru
	r_username: 000105656
	r_domain: sip.domain.com
	realm: sip.domain.com
	auth_username: 000105656
	auth_password: xxxxxxxxxxx
	auth_proxy: sip:000105656 at sip.domain.com
	expires: 120
	flags: 4
	diff_expires: 1780
	timer_expires: 1413879087
}
[root at sw4 sbin]# ./kamcmd uac.reg_disable l_uuid s:000105656
[root at sw4 sbin]# ./kamcmd uac.reg_dump
{
	l_uuid: 000105656
	l_username: 000105656
	l_domain: sip.domain2.ru
	r_username: 000105656
	r_domain: sip.domain.com
	realm: sip.domain.com
	auth_username: 000105656
	auth_password: xxxxxxxxxxx
	auth_proxy: sip:000105656 at sip.domain.com
	expires: 120
	flags: 4
	diff_expires: -3
	timer_expires: 1413877502
}
</code>
so flag “#define UAC_REG_DISABLED        (1<<0)” is not enabled, just  diff_expires reset
but uac.reg_enable  set this flag

<code>
[root at sw4 sbin]# ./kamcmd uac.reg_enable l_uuid s:000105656
[root at sw4 sbin]# ./kamcmd uac.reg_dump
{
	l_uuid: 000105656
	l_username: 000105656
	l_domain: sip.domain2.ru
	r_username: 000105656
	r_domain: sip.domain.com
	realm: sip.domain.com
	auth_username: 000105656
	auth_password: xxxxxxxxxxx
	auth_proxy: sip:000105656 at sip.domain.com
	expires: 120
	flags: 5
	diff_expires: -1
	timer_expires: 1413877709
}
</code>

I suggest this patch

<code>
diff --git a/modules/uac/uac_reg.c b/modules/uac/uac_reg.c
index 9b2abef..b81d633 100644
--- a/modules/uac/uac_reg.c
+++ b/modules/uac/uac_reg.c
@@ -1653,7 +1653,7 @@ static const char* rpc_uac_reg_enable_doc[2] = {
 
 static void rpc_uac_reg_enable(rpc_t* rpc, void* ctx)
 {
-       rpc_uac_reg_update_flag(rpc, ctx, 1, UAC_REG_DISABLED);
+       rpc_uac_reg_update_flag(rpc, ctx, 0, UAC_REG_DISABLED);
 }
 
 static const char* rpc_uac_reg_disable_doc[2] = {
@@ -1663,7 +1663,7 @@ static const char* rpc_uac_reg_disable_doc[2] = {
 
 static void rpc_uac_reg_disable(rpc_t* rpc, void* ctx)
 {
-       rpc_uac_reg_update_flag(rpc, ctx, 0, UAC_REG_DISABLED);
+       rpc_uac_reg_update_flag(rpc, ctx, 1, UAC_REG_DISABLED);
 }
 
 static const char* rpc_uac_reg_reload_doc[2] = {
</code>

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=483

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list