rem: } if (i == 0 && (!p->ns || strcmp(ns, p->ns))) { if (p[0].out) SOAP_FREE(p[0].out); if ((p[0].out = (char*)SOAP_MALLOC(strlen(ns) + 1))) strcpy(p[0].out, ns); if (p[1].out) SOAP_FREE(p[1].out); if (soap->version == 1) { if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1)))) strcpy(p[1].out, soap_enc1);
add: if (p->out) { if (!SOAP_STRCMP(ns, p->out)) break;
context: soap_push_namespace(struct soap *soap, const char *id, const char *ns){ register struct soap_nlist *np;  register struct Namespace *p;  np = (struct soap_nlist*)SOAP_MALLOC(sizeof(struct soap_nlist) + strlen(id));  if (!np)    return soap->error = SOAP_EOM;  np->next = soap->nlist;  soap->nlist = np;  strcpy(np->id, id);  np->level = soap->level;  np->index = -1;  np->ns = NULL;  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));  p = soap->local_namespaces;  if (p)  { register short i = 0;    if (!strcmp(ns, soap_env1))      soap->version = 1; /* make sure we use SOAP 1.1 */    else if (!strcmp(ns, soap_env2))      soap->version = 2; /* make sure we use SOAP 1.2 */    else    { for (; p->id; p++, i++)      { if (p->ns)          if (!strcmp(ns, p->ns))            break;        if (p->in)          if (!soap_tag_cmp(ns, p->in))          { if (p->out)              SOAP_FREE(p->out);            if ((p->out = (char*)SOAP_MALLOC(strlen(ns) + 1)))              strcpy(p->out, ns);            break;          }      }    }    if (i == 0 && (!p->ns || strcmp(ns, p->ns)))    { if (p[0].out)        SOAP_FREE(p[0].out);      if ((p[0].out = (char*)SOAP_MALLOC(strlen(ns) + 1)))        strcpy(p[0].out, ns);      if (p[1].out)          SOAP_FREE(p[1].out);      if (soap->version == 1)      { if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc1))))          strcpy(p[1].out, soap_enc1);      }      else if ((p[1].out = (char*)SOAP_MALLOC(sizeof(soap_enc2))))        strcpy(p[1].out, soap_enc2);    }    if (p && p->id)    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push OK ('%s' matches '%s' in namespace table)\n", id, p->id));      np->index = i;    }  }  if (!p || !p->id)  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns));    np->ns = (char*)SOAP_MALLOC(strlen(ns) + 1);    if (!np->ns)      return soap->error = SOAP_EOM;    strcpy(np->ns, ns);  }  return SOAP_OK;}