From: František Dvořák Date: Thu, 29 Jul 2010 13:02:22 +0000 (+0000) Subject: Parsing IDs with colon in path (notifids). X-Git-Tag: glite-jobid-api-c_R_1_0_6_1~6 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=54a82aa787c8d4eb3de0cb03b26f3a5a556897c7;p=jra1mw.git Parsing IDs with colon in path (notifids). --- diff --git a/org.glite.jobid.api-c/src/cjobid.c b/org.glite.jobid.api-c/src/cjobid.c index 7d8641e..bfd4203 100644 --- a/org.glite.jobid.api-c/src/cjobid.c +++ b/org.glite.jobid.api-c/src/cjobid.c @@ -166,11 +166,12 @@ int glite_jobid_parse(const char *idString, glite_jobid_t *jobId) pom1 = strchr(pom, '/'); if (!pom1) { free(pom); free(out); return EINVAL; } + pom1[0] = '\0'; pom2 = strrchr(pom, ':'); if (pom2 && strchr(pom2,']')) pom2 = NULL; - if ( pom2 && (pom1 > pom2)) { + if ( pom2 ) { pom[pom2-pom] = '\0'; out->BShost = strdup(pom); pom[pom1-pom] = '\0';