Skip to content
Snippets Groups Projects
Commit a9a6eee7 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Clarify function.

parent 162ee649
No related branches found
No related tags found
2 merge requests!91Add alternative code path for huge buffers.,!89Miscellaneous fixes and CDI-PIO improvements
......@@ -236,16 +236,16 @@ across_write_grib_message(stream_t *streamptr, const void *gribbuffer, size_t nb
return res;
}
int
static int
across_connect_int(char *path, char filemode, stream_t *streamptr)
{
(void)filemode;
// parse ACROSS address format: across://<host>[:<port>]/<expid>[@<expver>]
// note: cdiGetProtocol already advanced path up to after the across:// part
const char *host = path;
const char *port = ACROSS_DEFAULT_PORT;
const char *expid = NULL;
int expver = 1;
unsigned long expver = 1;
char *c = path;
while (*c != '\0')
......@@ -416,7 +416,8 @@ across_connect_int(char *path, char filemode, stream_t *streamptr)
across_info_t *info = (across_info_t *) Malloc(sizeof(across_info_t));
info->expid = strdup(expid);
info->expver = expver;
assert(expver <= INT_MAX);
info->expver = (int)expver;
streamptr->protocolData = info;
return sock;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment