Created
September 5, 2018 13:29
-
-
Save hpk42/c85d4a02ac5eb6fc5c45b10794e2802a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/dc_configure.c b/src/dc_configure.c | |
| index 06fbf55..1855cc8 100644 | |
| --- a/src/dc_configure.c | |
| +++ b/src/dc_configure.c | |
| @@ -38,8 +38,11 @@ | |
| static char* read_autoconf_file(dc_context_t* context, const char* url) | |
| { | |
| char* filecontent = NULL; | |
| + char* urlcopy = NULL; | |
| + | |
| dc_log_info(context, 0, "Testing %s ...", url); | |
| - filecontent = (char*)context->cb(context, DC_EVENT_HTTP_GET, (uintptr_t)url, 0); | |
| + urlcopy = dc_strdup(url); | |
| + filecontent = (char*)context->cb(context, DC_EVENT_HTTP_GET, (uintptr_t)urlcopy, 0); | |
| if (filecontent==NULL) { | |
| dc_log_info(context, 0, "Can't read file."); /* this is not a warning or an error, we're just testing */ | |
| return NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment