aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-02 17:47:31 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-02 17:47:31 +0000
commitcb66f2dfd9164430b3dd22484075ac421d2464dc (patch)
tree7d3cd3fc675b9ad4f2e33e470459bd748993035f
parent3b87d8ac2110bb6d5328a40a00b5cc845e47a5bf (diff)
downloadgnunet-cb66f2dfd9164430b3dd22484075ac421d2464dc.tar.gz
gnunet-cb66f2dfd9164430b3dd22484075ac421d2464dc.zip
-have default line, complain about missing options to log
-rw-r--r--src/conversation/conversation.conf.in1
-rw-r--r--src/conversation/conversation_api.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/conversation/conversation.conf.in b/src/conversation/conversation.conf.in
index 54204fc9f..ca27b535a 100644
--- a/src/conversation/conversation.conf.in
+++ b/src/conversation/conversation.conf.in
@@ -4,6 +4,7 @@ BINARY = gnunet-service-conversation
4UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-conversation.sock 4UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-conversation.sock
5HOSTNAME = localhost 5HOSTNAME = localhost
6@UNIXONLY@ PORT = 2106 6@UNIXONLY@ PORT = 2106
7LINE = 1
7 8
8ACCEPT_FROM = 127.0.0.1; 9ACCEPT_FROM = 127.0.0.1;
9ACCEPT_FROM6 = ::1; 10ACCEPT_FROM6 = ::1;
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c
index 24cd52eb2..a9efb7495 100644
--- a/src/conversation/conversation_api.c
+++ b/src/conversation/conversation_api.c
@@ -667,9 +667,20 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
667 "CONVERSATION", 667 "CONVERSATION",
668 "LINE", 668 "LINE",
669 &line)) 669 &line))
670 {
671 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
672 "CONVERSATION",
673 "LINE");
670 return NULL; 674 return NULL;
675 }
671 if (line >= (1 << 31)) 676 if (line >= (1 << 31))
677 {
678 GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
679 "CONVERSATION",
680 "LINE",
681 _("number too large"));
672 return NULL; 682 return NULL;
683 }
673 phone = GNUNET_new (struct GNUNET_CONVERSATION_Phone); 684 phone = GNUNET_new (struct GNUNET_CONVERSATION_Phone);
674 if (GNUNET_OK != 685 if (GNUNET_OK !=
675 GNUNET_CRYPTO_get_peer_identity (cfg, 686 GNUNET_CRYPTO_get_peer_identity (cfg,