Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > ff8cf53eae997820fba219411beb0a74 > files > 3

libsignal-protocol-c-2.3.3-3.mga9.src.rpm

From 1cd133c00d60f7cef3dd0bd4167649a3fe44ae27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franz=20Brau=C3=9Fe?= <brausse@informatik.uni-trier.de>
Date: Sat, 27 Jul 2019 13:19:54 +0200
Subject: [PATCH 3/4] re-gen protobuf .c and .h with protobuf-c-1.3.1

---
 src/FingerprintProtocol.pb-c.c  |  8 ++++--
 src/FingerprintProtocol.pb-c.h  |  6 ++---
 src/LocalStorageProtocol.pb-c.c | 44 ++++++++++++++++++++++-----------
 src/LocalStorageProtocol.pb-c.h | 28 ++++++++++-----------
 src/WhisperTextProtocol.pb-c.c  | 24 +++++++++++++-----
 src/WhisperTextProtocol.pb-c.h  | 14 +++++------
 6 files changed, 77 insertions(+), 47 deletions(-)

diff --git a/src/FingerprintProtocol.pb-c.c b/src/FingerprintProtocol.pb-c.c
index 421ee2f..966a81b 100644
--- a/src/FingerprintProtocol.pb-c.c
+++ b/src/FingerprintProtocol.pb-c.c
@@ -10,7 +10,7 @@
 void   textsecure__logical_fingerprint__init
                      (Textsecure__LogicalFingerprint         *message)
 {
-  static Textsecure__LogicalFingerprint init_value = TEXTSECURE__LOGICAL_FINGERPRINT__INIT;
+  static const Textsecure__LogicalFingerprint init_value = TEXTSECURE__LOGICAL_FINGERPRINT__INIT;
   *message = init_value;
 }
 size_t textsecure__logical_fingerprint__get_packed_size
@@ -47,13 +47,15 @@ void   textsecure__logical_fingerprint__free_unpacked
                      (Textsecure__LogicalFingerprint *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__logical_fingerprint__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__combined_fingerprints__init
                      (Textsecure__CombinedFingerprints         *message)
 {
-  static Textsecure__CombinedFingerprints init_value = TEXTSECURE__COMBINED_FINGERPRINTS__INIT;
+  static const Textsecure__CombinedFingerprints init_value = TEXTSECURE__COMBINED_FINGERPRINTS__INIT;
   *message = init_value;
 }
 size_t textsecure__combined_fingerprints__get_packed_size
@@ -90,6 +92,8 @@ void   textsecure__combined_fingerprints__free_unpacked
                      (Textsecure__CombinedFingerprints *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__combined_fingerprints__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
diff --git a/src/FingerprintProtocol.pb-c.h b/src/FingerprintProtocol.pb-c.h
index dfc3c60..1cd56db 100644
--- a/src/FingerprintProtocol.pb-c.h
+++ b/src/FingerprintProtocol.pb-c.h
@@ -10,7 +10,7 @@ PROTOBUF_C__BEGIN_DECLS
 
 #if PROTOBUF_C_VERSION_NUMBER < 1000000
 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
+#elif 1003001 < PROTOBUF_C_MIN_COMPILER_VERSION
 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
 #endif
 
@@ -37,7 +37,7 @@ struct  _Textsecure__LogicalFingerprint
 };
 #define TEXTSECURE__LOGICAL_FINGERPRINT__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__logical_fingerprint__descriptor) \
-    , 0,{0,NULL}, 0,{0,NULL} }
+    , 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__CombinedFingerprints
@@ -50,7 +50,7 @@ struct  _Textsecure__CombinedFingerprints
 };
 #define TEXTSECURE__COMBINED_FINGERPRINTS__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__combined_fingerprints__descriptor) \
-    , 0,0, NULL, NULL }
+    , 0, 0, NULL, NULL }
 
 
 /* Textsecure__LogicalFingerprint methods */
diff --git a/src/LocalStorageProtocol.pb-c.c b/src/LocalStorageProtocol.pb-c.c
index afe0171..00eff10 100644
--- a/src/LocalStorageProtocol.pb-c.c
+++ b/src/LocalStorageProtocol.pb-c.c
@@ -10,37 +10,37 @@
 void   textsecure__session_structure__chain__chain_key__init
                      (Textsecure__SessionStructure__Chain__ChainKey         *message)
 {
-  static Textsecure__SessionStructure__Chain__ChainKey init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__CHAIN_KEY__INIT;
+  static const Textsecure__SessionStructure__Chain__ChainKey init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__CHAIN_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__session_structure__chain__message_key__init
                      (Textsecure__SessionStructure__Chain__MessageKey         *message)
 {
-  static Textsecure__SessionStructure__Chain__MessageKey init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__MESSAGE_KEY__INIT;
+  static const Textsecure__SessionStructure__Chain__MessageKey init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__MESSAGE_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__session_structure__chain__init
                      (Textsecure__SessionStructure__Chain         *message)
 {
-  static Textsecure__SessionStructure__Chain init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__INIT;
+  static const Textsecure__SessionStructure__Chain init_value = TEXTSECURE__SESSION_STRUCTURE__CHAIN__INIT;
   *message = init_value;
 }
 void   textsecure__session_structure__pending_key_exchange__init
                      (Textsecure__SessionStructure__PendingKeyExchange         *message)
 {
-  static Textsecure__SessionStructure__PendingKeyExchange init_value = TEXTSECURE__SESSION_STRUCTURE__PENDING_KEY_EXCHANGE__INIT;
+  static const Textsecure__SessionStructure__PendingKeyExchange init_value = TEXTSECURE__SESSION_STRUCTURE__PENDING_KEY_EXCHANGE__INIT;
   *message = init_value;
 }
 void   textsecure__session_structure__pending_pre_key__init
                      (Textsecure__SessionStructure__PendingPreKey         *message)
 {
-  static Textsecure__SessionStructure__PendingPreKey init_value = TEXTSECURE__SESSION_STRUCTURE__PENDING_PRE_KEY__INIT;
+  static const Textsecure__SessionStructure__PendingPreKey init_value = TEXTSECURE__SESSION_STRUCTURE__PENDING_PRE_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__session_structure__init
                      (Textsecure__SessionStructure         *message)
 {
-  static Textsecure__SessionStructure init_value = TEXTSECURE__SESSION_STRUCTURE__INIT;
+  static const Textsecure__SessionStructure init_value = TEXTSECURE__SESSION_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__session_structure__get_packed_size
@@ -77,13 +77,15 @@ void   textsecure__session_structure__free_unpacked
                      (Textsecure__SessionStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__session_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__record_structure__init
                      (Textsecure__RecordStructure         *message)
 {
-  static Textsecure__RecordStructure init_value = TEXTSECURE__RECORD_STRUCTURE__INIT;
+  static const Textsecure__RecordStructure init_value = TEXTSECURE__RECORD_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__record_structure__get_packed_size
@@ -120,13 +122,15 @@ void   textsecure__record_structure__free_unpacked
                      (Textsecure__RecordStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__record_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__pre_key_record_structure__init
                      (Textsecure__PreKeyRecordStructure         *message)
 {
-  static Textsecure__PreKeyRecordStructure init_value = TEXTSECURE__PRE_KEY_RECORD_STRUCTURE__INIT;
+  static const Textsecure__PreKeyRecordStructure init_value = TEXTSECURE__PRE_KEY_RECORD_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__pre_key_record_structure__get_packed_size
@@ -163,13 +167,15 @@ void   textsecure__pre_key_record_structure__free_unpacked
                      (Textsecure__PreKeyRecordStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__pre_key_record_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__signed_pre_key_record_structure__init
                      (Textsecure__SignedPreKeyRecordStructure         *message)
 {
-  static Textsecure__SignedPreKeyRecordStructure init_value = TEXTSECURE__SIGNED_PRE_KEY_RECORD_STRUCTURE__INIT;
+  static const Textsecure__SignedPreKeyRecordStructure init_value = TEXTSECURE__SIGNED_PRE_KEY_RECORD_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__signed_pre_key_record_structure__get_packed_size
@@ -206,13 +212,15 @@ void   textsecure__signed_pre_key_record_structure__free_unpacked
                      (Textsecure__SignedPreKeyRecordStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__signed_pre_key_record_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__identity_key_pair_structure__init
                      (Textsecure__IdentityKeyPairStructure         *message)
 {
-  static Textsecure__IdentityKeyPairStructure init_value = TEXTSECURE__IDENTITY_KEY_PAIR_STRUCTURE__INIT;
+  static const Textsecure__IdentityKeyPairStructure init_value = TEXTSECURE__IDENTITY_KEY_PAIR_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__identity_key_pair_structure__get_packed_size
@@ -249,31 +257,33 @@ void   textsecure__identity_key_pair_structure__free_unpacked
                      (Textsecure__IdentityKeyPairStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__identity_key_pair_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__sender_key_state_structure__sender_chain_key__init
                      (Textsecure__SenderKeyStateStructure__SenderChainKey         *message)
 {
-  static Textsecure__SenderKeyStateStructure__SenderChainKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_CHAIN_KEY__INIT;
+  static const Textsecure__SenderKeyStateStructure__SenderChainKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_CHAIN_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__sender_key_state_structure__sender_message_key__init
                      (Textsecure__SenderKeyStateStructure__SenderMessageKey         *message)
 {
-  static Textsecure__SenderKeyStateStructure__SenderMessageKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_MESSAGE_KEY__INIT;
+  static const Textsecure__SenderKeyStateStructure__SenderMessageKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_MESSAGE_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__sender_key_state_structure__sender_signing_key__init
                      (Textsecure__SenderKeyStateStructure__SenderSigningKey         *message)
 {
-  static Textsecure__SenderKeyStateStructure__SenderSigningKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_SIGNING_KEY__INIT;
+  static const Textsecure__SenderKeyStateStructure__SenderSigningKey init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_SIGNING_KEY__INIT;
   *message = init_value;
 }
 void   textsecure__sender_key_state_structure__init
                      (Textsecure__SenderKeyStateStructure         *message)
 {
-  static Textsecure__SenderKeyStateStructure init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__INIT;
+  static const Textsecure__SenderKeyStateStructure init_value = TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__sender_key_state_structure__get_packed_size
@@ -310,13 +320,15 @@ void   textsecure__sender_key_state_structure__free_unpacked
                      (Textsecure__SenderKeyStateStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__sender_key_state_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__sender_key_record_structure__init
                      (Textsecure__SenderKeyRecordStructure         *message)
 {
-  static Textsecure__SenderKeyRecordStructure init_value = TEXTSECURE__SENDER_KEY_RECORD_STRUCTURE__INIT;
+  static const Textsecure__SenderKeyRecordStructure init_value = TEXTSECURE__SENDER_KEY_RECORD_STRUCTURE__INIT;
   *message = init_value;
 }
 size_t textsecure__sender_key_record_structure__get_packed_size
@@ -353,6 +365,8 @@ void   textsecure__sender_key_record_structure__free_unpacked
                      (Textsecure__SenderKeyRecordStructure *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__sender_key_record_structure__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
diff --git a/src/LocalStorageProtocol.pb-c.h b/src/LocalStorageProtocol.pb-c.h
index 43b5bce..c1c92a8 100644
--- a/src/LocalStorageProtocol.pb-c.h
+++ b/src/LocalStorageProtocol.pb-c.h
@@ -10,7 +10,7 @@ PROTOBUF_C__BEGIN_DECLS
 
 #if PROTOBUF_C_VERSION_NUMBER < 1000000
 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
+#elif 1003001 < PROTOBUF_C_MIN_COMPILER_VERSION
 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
 #endif
 
@@ -47,7 +47,7 @@ struct  _Textsecure__SessionStructure__Chain__ChainKey
 };
 #define TEXTSECURE__SESSION_STRUCTURE__CHAIN__CHAIN_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__chain__chain_key__descriptor) \
-    , 0,0, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__SessionStructure__Chain__MessageKey
@@ -64,7 +64,7 @@ struct  _Textsecure__SessionStructure__Chain__MessageKey
 };
 #define TEXTSECURE__SESSION_STRUCTURE__CHAIN__MESSAGE_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__chain__message_key__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SessionStructure__Chain
@@ -80,7 +80,7 @@ struct  _Textsecure__SessionStructure__Chain
 };
 #define TEXTSECURE__SESSION_STRUCTURE__CHAIN__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__chain__descriptor) \
-    , 0,{0,NULL}, 0,{0,NULL}, NULL, 0,NULL }
+    , 0, {0,NULL}, 0, {0,NULL}, NULL, 0,NULL }
 
 
 struct  _Textsecure__SessionStructure__PendingKeyExchange
@@ -103,7 +103,7 @@ struct  _Textsecure__SessionStructure__PendingKeyExchange
 };
 #define TEXTSECURE__SESSION_STRUCTURE__PENDING_KEY_EXCHANGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__pending_key_exchange__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SessionStructure__PendingPreKey
@@ -118,7 +118,7 @@ struct  _Textsecure__SessionStructure__PendingPreKey
 };
 #define TEXTSECURE__SESSION_STRUCTURE__PENDING_PRE_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__pending_pre_key__descriptor) \
-    , 0,0, 0,0, 0,{0,NULL} }
+    , 0, 0, 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__SessionStructure
@@ -150,7 +150,7 @@ struct  _Textsecure__SessionStructure
 };
 #define TEXTSECURE__SESSION_STRUCTURE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__session_structure__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,0, NULL, 0,NULL, NULL, NULL, 0,0, 0,0, 0,0, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, 0, NULL, 0,NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__RecordStructure
@@ -177,7 +177,7 @@ struct  _Textsecure__PreKeyRecordStructure
 };
 #define TEXTSECURE__PRE_KEY_RECORD_STRUCTURE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__pre_key_record_structure__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SignedPreKeyRecordStructure
@@ -196,7 +196,7 @@ struct  _Textsecure__SignedPreKeyRecordStructure
 };
 #define TEXTSECURE__SIGNED_PRE_KEY_RECORD_STRUCTURE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__signed_pre_key_record_structure__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,0 }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, 0 }
 
 
 struct  _Textsecure__IdentityKeyPairStructure
@@ -209,7 +209,7 @@ struct  _Textsecure__IdentityKeyPairStructure
 };
 #define TEXTSECURE__IDENTITY_KEY_PAIR_STRUCTURE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__identity_key_pair_structure__descriptor) \
-    , 0,{0,NULL}, 0,{0,NULL} }
+    , 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyStateStructure__SenderChainKey
@@ -222,7 +222,7 @@ struct  _Textsecure__SenderKeyStateStructure__SenderChainKey
 };
 #define TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_CHAIN_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_state_structure__sender_chain_key__descriptor) \
-    , 0,0, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyStateStructure__SenderMessageKey
@@ -235,7 +235,7 @@ struct  _Textsecure__SenderKeyStateStructure__SenderMessageKey
 };
 #define TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_MESSAGE_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_state_structure__sender_message_key__descriptor) \
-    , 0,0, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyStateStructure__SenderSigningKey
@@ -248,7 +248,7 @@ struct  _Textsecure__SenderKeyStateStructure__SenderSigningKey
 };
 #define TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__SENDER_SIGNING_KEY__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_state_structure__sender_signing_key__descriptor) \
-    , 0,{0,NULL}, 0,{0,NULL} }
+    , 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyStateStructure
@@ -263,7 +263,7 @@ struct  _Textsecure__SenderKeyStateStructure
 };
 #define TEXTSECURE__SENDER_KEY_STATE_STRUCTURE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_state_structure__descriptor) \
-    , 0,0, NULL, NULL, 0,NULL }
+    , 0, 0, NULL, NULL, 0,NULL }
 
 
 struct  _Textsecure__SenderKeyRecordStructure
diff --git a/src/WhisperTextProtocol.pb-c.c b/src/WhisperTextProtocol.pb-c.c
index f73c064..cea6366 100644
--- a/src/WhisperTextProtocol.pb-c.c
+++ b/src/WhisperTextProtocol.pb-c.c
@@ -10,7 +10,7 @@
 void   textsecure__signal_message__init
                      (Textsecure__SignalMessage         *message)
 {
-  static Textsecure__SignalMessage init_value = TEXTSECURE__SIGNAL_MESSAGE__INIT;
+  static const Textsecure__SignalMessage init_value = TEXTSECURE__SIGNAL_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__signal_message__get_packed_size
@@ -47,13 +47,15 @@ void   textsecure__signal_message__free_unpacked
                      (Textsecure__SignalMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__signal_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__pre_key_signal_message__init
                      (Textsecure__PreKeySignalMessage         *message)
 {
-  static Textsecure__PreKeySignalMessage init_value = TEXTSECURE__PRE_KEY_SIGNAL_MESSAGE__INIT;
+  static const Textsecure__PreKeySignalMessage init_value = TEXTSECURE__PRE_KEY_SIGNAL_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__pre_key_signal_message__get_packed_size
@@ -90,13 +92,15 @@ void   textsecure__pre_key_signal_message__free_unpacked
                      (Textsecure__PreKeySignalMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__pre_key_signal_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__key_exchange_message__init
                      (Textsecure__KeyExchangeMessage         *message)
 {
-  static Textsecure__KeyExchangeMessage init_value = TEXTSECURE__KEY_EXCHANGE_MESSAGE__INIT;
+  static const Textsecure__KeyExchangeMessage init_value = TEXTSECURE__KEY_EXCHANGE_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__key_exchange_message__get_packed_size
@@ -133,13 +137,15 @@ void   textsecure__key_exchange_message__free_unpacked
                      (Textsecure__KeyExchangeMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__key_exchange_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__sender_key_message__init
                      (Textsecure__SenderKeyMessage         *message)
 {
-  static Textsecure__SenderKeyMessage init_value = TEXTSECURE__SENDER_KEY_MESSAGE__INIT;
+  static const Textsecure__SenderKeyMessage init_value = TEXTSECURE__SENDER_KEY_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__sender_key_message__get_packed_size
@@ -176,13 +182,15 @@ void   textsecure__sender_key_message__free_unpacked
                      (Textsecure__SenderKeyMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__sender_key_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__sender_key_distribution_message__init
                      (Textsecure__SenderKeyDistributionMessage         *message)
 {
-  static Textsecure__SenderKeyDistributionMessage init_value = TEXTSECURE__SENDER_KEY_DISTRIBUTION_MESSAGE__INIT;
+  static const Textsecure__SenderKeyDistributionMessage init_value = TEXTSECURE__SENDER_KEY_DISTRIBUTION_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__sender_key_distribution_message__get_packed_size
@@ -219,13 +227,15 @@ void   textsecure__sender_key_distribution_message__free_unpacked
                      (Textsecure__SenderKeyDistributionMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__sender_key_distribution_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
 void   textsecure__device_consistency_code_message__init
                      (Textsecure__DeviceConsistencyCodeMessage         *message)
 {
-  static Textsecure__DeviceConsistencyCodeMessage init_value = TEXTSECURE__DEVICE_CONSISTENCY_CODE_MESSAGE__INIT;
+  static const Textsecure__DeviceConsistencyCodeMessage init_value = TEXTSECURE__DEVICE_CONSISTENCY_CODE_MESSAGE__INIT;
   *message = init_value;
 }
 size_t textsecure__device_consistency_code_message__get_packed_size
@@ -262,6 +272,8 @@ void   textsecure__device_consistency_code_message__free_unpacked
                      (Textsecure__DeviceConsistencyCodeMessage *message,
                       ProtobufCAllocator *allocator)
 {
+  if(!message)
+    return;
   assert(message->base.descriptor == &textsecure__device_consistency_code_message__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
diff --git a/src/WhisperTextProtocol.pb-c.h b/src/WhisperTextProtocol.pb-c.h
index bcab2c5..3d076f9 100644
--- a/src/WhisperTextProtocol.pb-c.h
+++ b/src/WhisperTextProtocol.pb-c.h
@@ -10,7 +10,7 @@ PROTOBUF_C__BEGIN_DECLS
 
 #if PROTOBUF_C_VERSION_NUMBER < 1000000
 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
-#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
+#elif 1003001 < PROTOBUF_C_MIN_COMPILER_VERSION
 # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
 #endif
 
@@ -42,7 +42,7 @@ struct  _Textsecure__SignalMessage
 };
 #define TEXTSECURE__SIGNAL_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__signal_message__descriptor) \
-    , 0,{0,NULL}, 0,0, 0,0, 0,{0,NULL} }
+    , 0, {0,NULL}, 0, 0, 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__PreKeySignalMessage
@@ -66,7 +66,7 @@ struct  _Textsecure__PreKeySignalMessage
 };
 #define TEXTSECURE__PRE_KEY_SIGNAL_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__pre_key_signal_message__descriptor) \
-    , 0,0, 0,0, 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, 0, 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__KeyExchangeMessage
@@ -85,7 +85,7 @@ struct  _Textsecure__KeyExchangeMessage
 };
 #define TEXTSECURE__KEY_EXCHANGE_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__key_exchange_message__descriptor) \
-    , 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyMessage
@@ -100,7 +100,7 @@ struct  _Textsecure__SenderKeyMessage
 };
 #define TEXTSECURE__SENDER_KEY_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_message__descriptor) \
-    , 0,0, 0,0, 0,{0,NULL} }
+    , 0, 0, 0, 0, 0, {0,NULL} }
 
 
 struct  _Textsecure__SenderKeyDistributionMessage
@@ -117,7 +117,7 @@ struct  _Textsecure__SenderKeyDistributionMessage
 };
 #define TEXTSECURE__SENDER_KEY_DISTRIBUTION_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__sender_key_distribution_message__descriptor) \
-    , 0,0, 0,0, 0,{0,NULL}, 0,{0,NULL} }
+    , 0, 0, 0, 0, 0, {0,NULL}, 0, {0,NULL} }
 
 
 struct  _Textsecure__DeviceConsistencyCodeMessage
@@ -130,7 +130,7 @@ struct  _Textsecure__DeviceConsistencyCodeMessage
 };
 #define TEXTSECURE__DEVICE_CONSISTENCY_CODE_MESSAGE__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&textsecure__device_consistency_code_message__descriptor) \
-    , 0,0, 0,{0,NULL} }
+    , 0, 0, 0, {0,NULL} }
 
 
 /* Textsecure__SignalMessage methods */
-- 
2.30.0