tolerate additional IPv4 address now available for gnunet.org
[oweals/gnunet.git] / src / fs / gnunet-service-fs.c
index 1e3d0937ae99a550f42684ebc9461f3c32382a60..691242ce32ead429075da9091c889bb315410b88 100644 (file)
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
+
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -962,15 +967,9 @@ static int
 check_client_index_start (void *cls,
                           const struct IndexStartMessage *ism)
 {
-  uint16_t msize;
   char *fn;
 
-  msize = ntohs (ism->header.size);
-  if (((const char *) ism)[msize - 1] != '\0')
-  {
-    GNUNET_break (0);
-    return GNUNET_SYSERR;
-  }
+  GNUNET_MQ_check_zero_termination (ism);
   if (0 != ism->reserved)
   {
     GNUNET_break (0);
@@ -1225,11 +1224,11 @@ static void
 peer_init_handler (void *cls,
                    const struct GNUNET_PeerIdentity *my_identity)
 {
-  if (0 != GNUNET_CRYPTO_cmp_peer_identity (&GSF_my_id,
+  if (0 != GNUNET_memcmp (&GSF_my_id,
                                             my_identity))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Peer identity missmatch, refusing to start!\n");
+                "Peer identity mismatch, refusing to start!\n");
     GNUNET_SCHEDULER_shutdown ();
   }
 }