@henningw commented on this pull request.
Thanks for the PR. I have added a few remarks to the changes, please have a
look.
> @@ -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
> +
+ 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 or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4195#pullrequestreview-2732478201
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4195/review/2732478...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the
sender!