{"thread":{"id":"13181","subject":"[PATCH (try 2)] http.c: 'use_git_config_string' on configuration options.","startedAt":"2008-04-19T22:23:52Z","lastAt":"2008-04-19T22:23:52Z","messageCount":1,"participants":["Tordek"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"74773","messageId":"480A70F8.8080400@yahoo.com.ar","threadId":"13181","inReplyTo":null,"subject":"[PATCH (try 2)] http.c: 'use_git_config_string' on configuration options.","fromName":"Tordek","fromEmail":"kedrot@gmail.com","sentAt":"2008-04-19T22:23:52Z","receivedAt":"2008-04-19T22:23:52Z","isPatch":true,"sender":{"key":"kedrot@gmail.com","avatar":"https://gravatar.com/avatar/bebae16b32978df6b3e930ec82f6b7e72f5f6883cc6b26419929e0356e9f26a7?d=mp&s=160"},"body":"Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>\n---\nSecond attempt at offering a Janitorial patch.\n\n  http.c |   34 ++++++++++++----------------------\n  1 files changed, 12 insertions(+), 22 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 256a5f1..22c75f5 100644\n--- a/http.c\n+++ b/http.c\n@@ -13,14 +13,14 @@ static CURL *curl_default;\n  char curl_errorstr[CURL_ERROR_SIZE];\n\n  static int curl_ssl_verify = -1;\n-static char *ssl_cert = NULL;\n+static const char *ssl_cert = NULL;\n  #if LIBCURL_VERSION_NUM >= 0x070902\n-static char *ssl_key = NULL;\n+static const char *ssl_key = NULL;\n  #endif\n  #if LIBCURL_VERSION_NUM >= 0x070908\n-static char *ssl_capath = NULL;\n+static const char *ssl_capath = NULL;\n  #endif\n-static char *ssl_cainfo = NULL;\n+static const char *ssl_cainfo = NULL;\n  static long curl_low_speed_limit = -1;\n  static long curl_low_speed_time = -1;\n  static int curl_ftp_no_epsv = 0;\n@@ -100,39 +100,29 @@ static int http_options(const char *var, const \nchar *value)\n  \t}\n\n  \tif (!strcmp(\"http.sslcert\", var)) {\n-\t\tif (ssl_cert == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cert = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cert == NULL)\n+\t\t\treturn git_config_string(&ssl_cert, var, value);\n  \t\treturn 0;\n  \t}\n  #if LIBCURL_VERSION_NUM >= 0x070902\n  \tif (!strcmp(\"http.sslkey\", var)) {\n-\t\tif (ssl_key == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_key = xstrdup(value);\n+\t\tif (ssl_key == NULL)\n+\t\t\treturn git_config_string(&ssl_key, var, value);\n  \t\t}\n  \t\treturn 0;\n  \t}\n  #endif\n  #if LIBCURL_VERSION_NUM >= 0x070908\n  \tif (!strcmp(\"http.sslcapath\", var)) {\n-\t\tif (ssl_capath == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_capath = xstrdup(value);\n+\t\tif (ssl_capath == NULL)\n+\t\t\treturn git_config_string(&ssl_capath, var, value);\n  \t\t}\n  \t\treturn 0;\n  \t}\n  #endif\n  \tif (!strcmp(\"http.sslcainfo\", var)) {\n-\t\tif (ssl_cainfo == NULL) {\n-\t\t\tif (!value)\n-\t\t\t\treturn config_error_nonbool(var);\n-\t\t\tssl_cainfo = xstrdup(value);\n-\t\t}\n+\t\tif (ssl_cainfo == NULL)\n+\t\t\treturn git_config_string(&ssl_cainfo,val,var);\n  \t\treturn 0;\n  \t}\n\n-- \n1.5.2.2\n"}]}