[asterisk-commits] rizzo: trunk r77630 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jul 28 04:29:26 CDT 2007


Author: rizzo
Date: Sat Jul 28 04:29:22 2007
New Revision: 77630

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77630
Log:
simplify a conditional expression using S_OR

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=77630&r1=77629&r2=77630
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Jul 28 04:29:22 2007
@@ -17455,10 +17455,7 @@
 	global_allowsubscribe = FALSE;
 	snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ASTERISK_VERSION);
 	ast_copy_string(default_notifymime, DEFAULT_NOTIFYMIME, sizeof(default_notifymime));
-	if (ast_strlen_zero(ast_config_AST_SYSTEM_NAME))
-		ast_copy_string(global_realm, DEFAULT_REALM, sizeof(global_realm));
-	else
-		ast_copy_string(global_realm, ast_config_AST_SYSTEM_NAME, sizeof(global_realm));
+	ast_copy_string(global_realm, S_OR(ast_config_AST_SYSTEM_NAME, DEFAULT_REALM), sizeof(global_realm));
 	ast_copy_string(default_callerid, DEFAULT_CALLERID, sizeof(default_callerid));
 	compactheaders = DEFAULT_COMPACTHEADERS;
 	global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;




More information about the asterisk-commits mailing list