[asterisk-commits] mmichelson: branch 12 r400749 - in /branches/12/res: ./ res_pjsip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 8 15:51:22 CDT 2013


Author: mmichelson
Date: Tue Oct  8 15:51:21 2013
New Revision: 400749

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400749
Log:
Switch from using pjsip_strerror to pj_strerror.

pjsip_strerror is only aware of PJSIP-specific error
codes. pj_strerror() is aware of all PJProject error
codes and OS-specific error codes.

This specifically fixes an oft-seen error in transport
configuration code where EADDRINUSE would result in
"Unknown PJSIP error 120098" instead of a useful
message.


Modified:
    branches/12/res/res_pjsip.c
    branches/12/res/res_pjsip/config_transport.c

Modified: branches/12/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip.c?view=diff&rev=400749&r1=400748&r2=400749
==============================================================================
--- branches/12/res/res_pjsip.c (original)
+++ branches/12/res/res_pjsip.c Tue Oct  8 15:51:21 2013
@@ -1437,7 +1437,7 @@
 	if (status != PJ_SUCCESS) {
 		char err[PJ_ERR_MSG_SIZE];
 
-		pjsip_strerror(status, err, sizeof(err));
+		pj_strerror(status, err, sizeof(err));
 		ast_log(LOG_ERROR, "Could not create dialog with endpoint %s. %s\n",
 				ast_sorcery_object_get_id(endpoint), err);
 		return NULL;

Modified: branches/12/res/res_pjsip/config_transport.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip/config_transport.c?view=diff&rev=400749&r1=400748&r2=400749
==============================================================================
--- branches/12/res/res_pjsip/config_transport.c (original)
+++ branches/12/res/res_pjsip/config_transport.c Tue Oct  8 15:51:21 2013
@@ -184,7 +184,7 @@
 	if (res != PJ_SUCCESS) {
 		char msg[PJ_ERR_MSG_SIZE];
 
-		pjsip_strerror(res, msg, sizeof(msg));
+		pj_strerror(res, msg, sizeof(msg));
 		ast_log(LOG_ERROR, "Transport '%s' could not be started: %s\n", ast_sorcery_object_get_id(obj), msg);
 		return -1;
 	}




More information about the asterisk-commits mailing list