You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2003/07/31 13:50:19 UTC
cvs commit: xml-axis/c/src/common Packet.cpp
sanjaya 2003/07/31 04:50:19
Modified: c/src/common Packet.cpp
Log:
fixed getheader function to handle no http headers
Revision Changes Path
1.2 +11 -3 xml-axis/c/src/common/Packet.cpp
Index: Packet.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/common/Packet.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Packet.cpp 25 Jun 2003 07:11:19 -0000 1.1
+++ Packet.cpp 31 Jul 2003 11:50:19 -0000 1.2
@@ -1,6 +1,8 @@
#include "Packet.h"
#include <string.h>
+#include <stdio.h>
+
char* getheader(soapstream* soap, char* pchkey)
{
header* hdrs = NULL;
@@ -20,13 +22,19 @@
default:; //some error condition
}
+ if(count==0 || hdrs==NULL)
+ {
+ return NULL;
+ }
+
for (int ix=0; ix<count; ix++)
{
- header* hdr = hdrs + ix;
- if (strcmp(hdr->headername, SOAPACTIONHEADER) == 0)
+ //header* hdr = hdrs + ix;
+ if (strcmp((hdrs+ix)->headername, SOAPACTIONHEADER) == 0)
{
- return hdr->headervalue;
+ return (hdrs+ix)->headervalue;
}
+
}
return NULL;
}