[svn-commits] may: branch 1.8 r415598 - /branches/1.8/addons/chan_ooh323.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 10 04:12:08 CDT 2014


Author: may
Date: Tue Jun 10 04:11:58 2014
New Revision: 415598

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=415598
Log:
chan_ooh323: fix loading module failure if there no accessible h323_log or ooh323 config file

change return 1 to return AST_MODULE_LOAD_FAILURE

ASTERISK-23814 #close

(closes issue ASTERISK-23814)

Reported by: Igor Goncharovsky
Patches:
	ASTERISK-23814-ast18.patch

Modified:
    branches/1.8/addons/chan_ooh323.c

Modified: branches/1.8/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/chan_ooh323.c?view=diff&rev=415598&r1=415597&r2=415598
==============================================================================
--- branches/1.8/addons/chan_ooh323.c (original)
+++ branches/1.8/addons/chan_ooh323.c Tue Jun 10 04:11:58 2014
@@ -3317,7 +3317,7 @@
 		/* Make sure we can register our OOH323 channel type */
 		if (ast_channel_register(&ooh323_tech)) {
 			ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
-			return 0;
+			return AST_MODULE_LOAD_FAILURE;
 		}
 		ast_rtp_glue_register(&ooh323_rtp);
 		ast_udptl_proto_register(&ooh323_udptl);
@@ -3325,9 +3325,9 @@
 
 		 /* fire up the H.323 Endpoint */		 
 		if (OO_OK != ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, gLogFile)) {
-         ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
+			ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
                             "OOH323 Disabled\n");
-			return 1;
+			return AST_MODULE_LOAD_FAILURE;
 		}
 
 		if (gIsGateway)
@@ -3341,10 +3341,9 @@
 		ooH323EpSetLocalAddress(gIP, gPort);
 		ooH323EpSetCallerID(gCallerID);
  
-      if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, 
-                                 ooconfig.mTCPPortEnd) == OO_FAILED) {
-         ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
-      }
+		if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd) == OO_FAILED) {
+			ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
+		}
 
 		/* Set aliases if any */
 		for (pNewAlias = gAliasList; pNewAlias; pNewAlias = pNewAlias->next) {
@@ -3358,8 +3357,8 @@
 			case T_H225AliasAddress_email_ID:	
 				ooH323EpAddAliasEmailID(pNewAlias->value);
 				break;
-         default:
-            ;
+			default:
+				;
 			}
 		}
 
@@ -3426,6 +3425,9 @@
 		}
 		/* And start the monitor for the first time */
 		restart_monitor();
+	} else {
+		ast_log(LOG_ERROR, "Can't load ooh323 config file, OOH323 Disabled\n");
+		return AST_MODULE_LOAD_FAILURE;
 	}
 
 	return 0;




More information about the svn-commits mailing list