From e38fa2748c5f85427959bc61f112582d72d856de Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 15 Nov 2013 21:20:18 +0000 Subject: -reworking connection to allow multiple waiting/active connections per line --- src/conversation/conversation_api.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/conversation/conversation_api.c') diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c index 9dfc6e913..1c71217bd 100644 --- a/src/conversation/conversation_api.c +++ b/src/conversation/conversation_api.c @@ -624,6 +624,7 @@ reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone) * @param ego ego to use for name resolution (when determining caller ID) * @param event_handler how to notify the owner of the phone about events * @param event_handler_cls closure for @a event_handler + * @return NULL on error (no valid line configured) */ struct GNUNET_CONVERSATION_Phone * GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg, @@ -640,6 +641,8 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg, "LINE", &line)) return NULL; + if (line >= (1 << 31)) + return NULL; phone = GNUNET_new (struct GNUNET_CONVERSATION_Phone); if (GNUNET_OK != GNUNET_CRYPTO_get_peer_identity (cfg, -- cgit v1.2.3