[svn-commits] jrose: branch 1.8 r311352 - in /branches/1.8: channels/ res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 18 11:19:13 CDT 2011


Author: jrose
Date: Fri Mar 18 11:19:05 2011
New Revision: 311352

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311352
Log:
Changes some print statements/events to use a blank string in place of NULL if the string in question is NULL.

This is supposed to improve Solaris compatibility since Solaris goes berserk when trying to output NULL strings.

(closes issue #18759)
Reported by: bklang
Patches:
      null-strings.patch uploaded by bklang (license 919)


Modified:
    branches/1.8/channels/chan_sip.c
    branches/1.8/res/res_fax.c
    branches/1.8/res/res_jabber.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=311352&r1=311351&r2=311352
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Fri Mar 18 11:19:05 2011
@@ -23453,7 +23453,7 @@
 		if (!authpeer || AST_LIST_EMPTY(&authpeer->mailboxes)) {
 			transmit_response(p, "404 Not found (no mailbox)", req);
 			pvt_set_needdestroy(p, "received 404 response");
-			ast_log(LOG_NOTICE, "Received SIP subscribe for peer without mailbox: %s\n", authpeer->name);
+			ast_log(LOG_NOTICE, "Received SIP subscribe for peer without mailbox: %s\n", S_OR(authpeer->name, ""));
 			if (authpeer)
 				unref_peer(authpeer, "unref_peer, from handle_request_subscribe (authpeer 4)");
 			return 0;

Modified: branches/1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_fax.c?view=diff&rev=311352&r1=311351&r2=311352
==============================================================================
--- branches/1.8/res/res_fax.c (original)
+++ branches/1.8/res/res_fax.c Fri Mar 18 11:19:05 2011
@@ -1764,11 +1764,11 @@
 		      info.context,
 		      info.exten,
 		      info.cid,
-		      pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"),
-		      pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"),
-		      pbx_builtin_getvar_helper(chan, "FAXPAGES"),
-		      pbx_builtin_getvar_helper(chan, "FAXRESOLUTION"),
-		      pbx_builtin_getvar_helper(chan, "FAXBITRATE"),
+		      S_OR(pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXPAGES"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXRESOLUTION"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXBITRATE"), ""),
 		      args.filename);
 	ast_channel_unlock(chan);
 
@@ -2266,11 +2266,11 @@
 		      info.context,
 		      info.exten,
 		      info.cid,
-		      pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"),
-		      pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"),
-		      pbx_builtin_getvar_helper(chan, "FAXPAGES"),
-		      pbx_builtin_getvar_helper(chan, "FAXRESOLUTION"),
-		      pbx_builtin_getvar_helper(chan, "FAXBITRATE"),
+		      S_OR(pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXPAGES"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXRESOLUTION"), ""),
+		      S_OR(pbx_builtin_getvar_helper(chan, "FAXBITRATE"), ""),
 		      filenames);
 	ast_channel_unlock(chan);
 

Modified: branches/1.8/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_jabber.c?view=diff&rev=311352&r1=311351&r2=311352
==============================================================================
--- branches/1.8/res/res_jabber.c (original)
+++ branches/1.8/res/res_jabber.c Fri Mar 18 11:19:05 2011
@@ -2490,7 +2490,7 @@
 			"Account: %s\r\nJID: %s\r\nResource: %s\r\nStatus: %d\r\nPriority: %d"
 			"\r\nDescription: %s\r\n",
 			client->name, pak->from->partial, found->resource, found->status,
-			found->priority, found->description);
+			found->priority, S_OR(found->description, ""));
 	} else {
 		manager_event(EVENT_FLAG_USER, "JabberStatus",
 			"Account: %s\r\nJID: %s\r\nStatus: %d\r\n",




More information about the svn-commits mailing list