summaryrefslogtreecommitdiff
path: root/res/res_calendar_exchange.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2012-12-13 21:20:32 +0000
committerSean Bright <sean@malleable.com>2012-12-13 21:20:32 +0000
commit1e51b9eaa1eda32ea1135ff1df268d5c3908c0f3 (patch)
tree6a43c6ae17e769681f24e7a26d5f1131ce2f2c80 /res/res_calendar_exchange.c
parent0f62fa6e476b0d8f64df03f21df359cb7bab6d3e (diff)
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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_calendar_exchange.c')
-rw-r--r--res/res_calendar_exchange.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c
index dda4414be..ff711c541 100644
--- a/res/res_calendar_exchange.c
+++ b/res/res_calendar_exchange.c
@@ -246,7 +246,8 @@ static struct ast_str *generate_exchange_uuid(struct ast_str *uid)
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));