[asterisk-commits] seanbright: trunk r378000 - /trunk/res/res_calendar_exchange.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 13 15:20:36 CST 2012
Author: seanbright
Date: Thu Dec 13 15:20:32 2012
New Revision: 378000
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378000
Log:
Make generate_exchange_uuid() always return the passed ast_str pointer.
I changed this code earlier to return NULL if it wasn't able to generate a UUID,
whereas the earlier code would always return the ast_str that was passed in.
Switch back to returning the ast_str, only set it to the empty string instead if
UUID generation fails. We still do a validity check later which will catch this
and blow up if necessary.
Modified:
trunk/res/res_calendar_exchange.c
Modified: trunk/res/res_calendar_exchange.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_exchange.c?view=diff&rev=378000&r1=377999&r2=378000
==============================================================================
--- trunk/res/res_calendar_exchange.c (original)
+++ trunk/res/res_calendar_exchange.c Thu Dec 13 15:20:32 2012
@@ -246,7 +246,8 @@
struct ast_uuid *uuid = ast_uuid_generate();
if (!uuid) {
- return NULL;
+ ast_str_set(&uid, 0, "%s", "");
+ return uid;
}
ast_str_set(&uid, 0, "%s", ast_uuid_to_str(uuid, buffer, AST_UUID_STR_LEN));
More information about the asterisk-commits
mailing list