Skip to content

Commit

Permalink
Merge pull request #1680 from eisenhauer/EVPathUpstream
Browse files Browse the repository at this point in the history
EVPath upstream
  • Loading branch information
eisenhauer authored Aug 13, 2019
2 parents 3a3491e + 27d93a4 commit 0ea7d66
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
24 changes: 24 additions & 0 deletions thirdparty/EVPath/EVPath/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2010, Georgia Tech Research Corporation
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Georgia Tech Research Corporation nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY GEORGIA TECH RESEARCH CORPORATION ''AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL GEORGIA TECH BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 1 addition & 11 deletions thirdparty/EVPath/EVPath/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,20 +1413,10 @@ INT_CMget_self_ip_addr(CManager cm)
return IP;
}

extern char *IP_config_diagnostics;
extern int IP_config_output_len;

extern char *
INT_CMget_ip_config_diagnostics(CManager cm)
{
char *output;
IP_config_output_len = 0; /* setup output */
get_IP_config(NULL, 0, NULL, NULL, NULL, NULL, NULL,
CMstatic_trans_svcs.trace_out, cm);
IP_config_output_len = -1; /* disable output */
output = IP_config_diagnostics;
IP_config_diagnostics = NULL; /* not ours anymore */
return output;
return IP_get_diagnostics(cm, CMstatic_trans_svcs.trace_out);
}

#define CURRENT_HANDSHAKE_VERSION 1
Expand Down
3 changes: 3 additions & 0 deletions thirdparty/EVPath/EVPath/cm_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ extern void
get_IP_config(char *hostname_buf, int len, int* IP_p, int *port_range_low_p, int *port_range_high_p,
int *use_hostname_p, attr_list attrs, CMTransport_trace trace_func, void *trace_data);

extern char *
IP_get_diagnostics(CManager cm, CMTransport_trace trace_out);

#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
Expand Down
17 changes: 15 additions & 2 deletions thirdparty/EVPath/EVPath/ip_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,21 @@ get_qual_hostname(char *buf, int len, attr_list attrs,
}


char *IP_config_diagnostics = NULL;
int IP_config_output_len = -1;
static char *IP_config_diagnostics = NULL;
static int IP_config_output_len = -1;

extern char*
IP_get_diagnostics(CManager cm, CMTransport_trace trace_out)
{
char *output;
IP_config_output_len = 0; /* setup output */
get_IP_config(NULL, 0, NULL, NULL, NULL, NULL, NULL,
trace_out, cm);
IP_config_output_len = -1; /* disable output */
output = IP_config_diagnostics;
IP_config_diagnostics = NULL; /* not ours anymore */
return output;
}

static void
dump_output(int length_estimate, char *format, ...)
Expand Down

0 comments on commit 0ea7d66

Please sign in to comment.