[svn-commits] russell: branch 1.6.1 r245625 - in /branches/1.6.1: ./ main/event.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Feb 8 17:45:14 CST 2010


Author: russell
Date: Mon Feb  8 17:45:10 2010
New Revision: 245625

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=245625
Log:
Merged revisions 245624 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r245624 | russell | 2010-02-08 17:43:00 -0600 (Mon, 08 Feb 2010) | 5 lines
  
  Fix return value of get_ie_str() and get_ie_str_hash() for non-existent IE.
  
  I found this bug while developing a unit test for event allocation.  Testing
  is awesome.
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/event.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/event.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/event.c?view=diff&rev=245625&r1=245624&r2=245625
==============================================================================
--- branches/1.6.1/main/event.c (original)
+++ branches/1.6.1/main/event.c Mon Feb  8 17:45:10 2010
@@ -796,7 +796,7 @@
 
 	str_payload = (struct ast_event_ie_str_payload *) iterator->ie->ie_payload;
 
-	return str_payload->str;
+	return str_payload ? str_payload->str : NULL;
 }
 
 void *ast_event_iterator_get_ie_raw(struct ast_event_iterator *iterator)
@@ -824,7 +824,7 @@
 
 	str_payload = ast_event_get_ie_raw(event, ie_type);
 
-	return str_payload->hash;
+	return str_payload ? str_payload->hash : 0;
 }
 
 const char *ast_event_get_ie_str(const struct ast_event *event, enum ast_event_ie_type ie_type)
@@ -833,7 +833,7 @@
 
 	str_payload = ast_event_get_ie_raw(event, ie_type);
 
-	return str_payload->str;
+	return str_payload ? str_payload->str : NULL;
 }
 
 const void *ast_event_get_ie_raw(const struct ast_event *event, enum ast_event_ie_type ie_type)




More information about the svn-commits mailing list