[asterisk-commits] russell: branch russell/ais r78693 - /team/russell/ais/res/res_ais.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 8 18:18:51 CDT 2007


Author: russell
Date: Wed Aug  8 18:18:46 2007
New Revision: 78693

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78693
Log:
Fix a silly copy/paste mistake that took me all afternoon to find.  It really
sucks that if I had properly checked the return value from these API calls, I
would have found this immediately.  I checked the return value of *every other*
function call except these two ... oh well!  I learned a lot about the internals
of openais in the process of debugging.

Anyway, I now present to you *working*, distributed MWI.  :)

Modified:
    team/russell/ais/res/res_ais.c

Modified: team/russell/ais/res/res_ais.c
URL: http://svn.digium.com/view/asterisk/team/russell/ais/res/res_ais.c?view=diff&rev=78693&r1=78692&r2=78693
==============================================================================
--- team/russell/ais/res/res_ais.c (original)
+++ team/russell/ais/res/res_ais.c Wed Aug  8 18:18:46 2007
@@ -330,9 +330,18 @@
 	SaSelectionObjectT clm_fd, evt_fd, max_fd;
 	int res;
 	fd_set read_fds;
-
-	saClmSelectionObjectGet(clm_handle, &clm_fd);
-	saClmSelectionObjectGet(clm_handle, &evt_fd);
+	SaAisErrorT ais_res;
+
+	ais_res = saClmSelectionObjectGet(clm_handle, &clm_fd);
+	if (ais_res != SA_AIS_OK) {
+		ast_log(LOG_ERROR, "Failed to retrieve select fd for CLM service.  This module will not operate.\n");
+		return NULL;
+	}
+	ais_res = saEvtSelectionObjectGet(evt_handle, &evt_fd);
+	if (ais_res != SA_AIS_OK) {
+		ast_log(LOG_ERROR, "Failed to retrieve select fd for EVT service.  This module will not operate.\n");
+		return NULL;
+	}
 
 	max_fd = clm_fd > evt_fd ? clm_fd : evt_fd;
 




More information about the asterisk-commits mailing list