otrv4 / libotr-ng

A new implementation of OTR with support for version 4. This is a mirror of https://bugs.otr.im/otrv4/libotr-ng
Other
43 stars 9 forks source link

Create an error for when you try to send more prekey messages than accepted by the policy #171

Closed claucece closed 5 years ago

claucece commented 5 years ago

As seen here: https://github.com/otrv4/libotr-ng/blob/master/src/client.c#L581

API prekey_message_s **
otrng_client_build_prekey_messages(uint8_t num_messages,
                                   otrng_client_s *client) {
  uint32_t instance_tag;
  prekey_message_s **messages;
  int i, j;

  if (num_messages > MAX_NUMBER_PUBLISHED_PREKEY_MSGS) {
    // TODO: notify error
    return NULL;
  }

This can be either an error message or a warning.

claucece commented 5 years ago

I think this can be handled with warnings. We need to create a callback, so warning are shown.