@henningw commented on this pull request.
Thanks for the PR. I have added a few remarks to the changes, please have a look.
In src/modules/pua_json/defs.h:
> @@ -139,4 +147,12 @@ </dialog>\ </dialog-info>" +#define AS_FEATURE_BODY \ + "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\ +<DoNotDisturbEvent xmlns=\"http://www.ecma-international.org/standards/ecma-323/csta/ed3\">\
This URL returns a 404, seems that they changed their page structure
In src/modules/pua_json/pua_json_publish.c:
> + + json_api.extract_field(json_obj, AS_FEATURE_JSON_CALLID, &callid); + + json_api.extract_field(json_obj, AS_FEATURE_JSON_FROM, &from); + json_api.extract_field(json_obj, AS_FEATURE_JSON_FROM_USER, &from_user); + json_api.extract_field(json_obj, AS_FEATURE_JSON_FROM_REALM, &from_realm); + + json_api.extract_field(json_obj, AS_FEATURE_JSON_DND_STATUS, &dnd_status); + + struct json_object *ExpiresObj = + json_api.get_object(json_obj, AS_FEATURE_JSON_EXPIRES); + if(ExpiresObj != NULL) { + expires = json_object_get_int(ExpiresObj); + } + + len = snprintf(body, AS_FEATURE_BODY_BUFFER_SIZE, AS_FEATURE_BODY,
We probably want to check if you've got a from and dnd value from the json before doing the snprintf. Compare to line 294 in this file, for example. If there are other mandatory fields we need to get from the json, we should also check for them. If they are not present, just go to the error case.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.