Browse Source

comply to naming scheme

ENGINE-872
Volker Birk 11 months ago
parent
commit
e34c9c009f
3 changed files with 10 additions and 10 deletions
  1. +6
    -6
      src/baseprotocol.c
  2. +1
    -1
      src/baseprotocol.h
  3. +3
    -3
      src/key_reset.c

+ 6
- 6
src/baseprotocol.c View File

@ -17,7 +17,7 @@ static PEP_STATUS _get_base_protocol_type_str(base_protocol_type type, const cha
case BASE_SYNC:
*type_str = _BASE_PROTO_MIME_TYPE_SYNC;
break;
case BASE_KEYRESET:
case BASE_DISTRIBUTION:
*type_str = _BASE_PROTO_MIME_TYPE_DIST;
break;
default:
@ -40,7 +40,7 @@ PEP_STATUS base_decorate_message(
assert(msg);
assert(payload);
assert(size);
assert(type == BASE_SYNC || type == BASE_KEYRESET);
assert(type == BASE_SYNC || type == BASE_DISTRIBUTION);
if (!(msg && payload && size && type))
return PEP_ILLEGAL_VALUE;
@ -54,7 +54,7 @@ PEP_STATUS base_decorate_message(
bl = bloblist_add(msg->attachments, payload, size,
_BASE_PROTO_MIME_TYPE_SYNC, "sync.pEp");
break;
case BASE_KEYRESET:
case BASE_DISTRIBUTION:
bl = bloblist_add(msg->attachments, payload, size,
_BASE_PROTO_MIME_TYPE_DIST, "distribution.pEp");
break;
@ -117,7 +117,7 @@ PEP_STATUS base_prepare_message(
assert(payload);
assert(size);
assert(result);
assert(type == BASE_SYNC || type == BASE_KEYRESET);
assert(type == BASE_SYNC || type == BASE_DISTRIBUTION);
if (!(me && partner && payload && size && result && type))
return PEP_ILLEGAL_VALUE;
@ -172,7 +172,7 @@ PEP_STATUS base_extract_message(
PEP_STATUS status = PEP_STATUS_OK;
assert(session && msg && size && payload && fpr);
assert(type == BASE_SYNC || type == BASE_KEYRESET);
assert(type == BASE_SYNC || type == BASE_DISTRIBUTION);
if (!(session && msg && size && payload && fpr && type))
return PEP_ILLEGAL_VALUE;
@ -264,7 +264,7 @@ PEP_STATUS try_base_prepare_message(
assert(payload);
assert(size);
assert(result);
assert(type == BASE_SYNC || type == BASE_KEYRESET);
assert(type == BASE_SYNC || type == BASE_DISTRIBUTION);
if (!(session && session->messageToSend && session->notifyHandshake))
return PEP_ILLEGAL_VALUE;


+ 1
- 1
src/baseprotocol.h View File

@ -28,7 +28,7 @@ extern "C" {
typedef enum _base_protocol_type {
BASE_SIGN = 0,
BASE_SYNC = 1,
BASE_KEYRESET = 2
BASE_DISTRIBUTION = 2
} base_protocol_type;


+ 3
- 3
src/key_reset.c View File

@ -219,7 +219,7 @@ static PEP_STATUS _generate_own_commandlist_msg(PEP_SESSION session,
pEp_identity* from = identity_dup(from_idents->ident);
pEp_identity* to = identity_dup(from);
status = base_prepare_message(session, from, to,
BASE_KEYRESET, payload, size, NULL,
BASE_DISTRIBUTION, payload, size, NULL,
&msg);
if (status != PEP_STATUS_OK)
@ -329,7 +329,7 @@ static PEP_STATUS _generate_keyreset_command_message(PEP_SESSION session,
return status;
status = base_prepare_message(session, outgoing_ident, to_ident,
BASE_KEYRESET, payload, size, NULL,
BASE_DISTRIBUTION, payload, size, NULL,
&msg);
if (status != PEP_STATUS_OK) {
@ -536,7 +536,7 @@ PEP_STATUS receive_key_reset(PEP_SESSION session,
char* not_used_fpr = NULL;
status = base_extract_message(session,
reset_msg,
BASE_KEYRESET,
BASE_DISTRIBUTION,
&size,
&payload,
&not_used_fpr);


Loading…
Cancel
Save