> From: Andreas Fink
> Sent: 01 July 2008 13:51
>
> On 01.07.2008, at 13:47, Stipe Tolj wrote:
>
> > Bostock James schrieb:
> >
> >> I also tried building using the native AIX compiler which, in
> >> addition to the above changes, requires that all the C++-style
> >> comments be converted to C-style comments (there's probably a
> >> compiler switch that allows C++-style comments but by default they
> >> are rejected).
>
> C++ styles in a C program are in any case bad. Where are they?
>
gw/smsc/smsc_fake.c
test/wapproxy.c
wap/wsp_headers.c
wap/wtls.h
wap/wtls_pdu.h
wap/wtls_state-decl.h
I think the following patch below gets them all.
-james
diff -ur gateway-1.4.1.orig/gw/smsc/smsc_fake.c
gateway-1.4.1/gw/smsc/smsc_fake.c
--- gateway-1.4.1.orig/gw/smsc/smsc_fake.c 2006-04-07
13:49:50.000000000 +0100
+++ gateway-1.4.1/gw/smsc/smsc_fake.c 2008-06-30 16:05:50.000000000
+0100
@@ -115,7 +115,7 @@
int len;
debug("bb.sms", 0, "smsc_fake: sending message to client");
-// msg_dump(msg, 0);
+/* msg_dump(msg, 0); */
line = octstr_duplicate(msg->sms.sender);
octstr_append_char(line, ' ');
@@ -224,7 +224,7 @@
msg->sms.smsc_id = octstr_duplicate(conn->id);
debug("bb.sms", 0, "smsc_fake: new message received");
-// msg_dump(msg, 0);
+/* msg_dump(msg, 0); */
bb_smscconn_receive(conn, msg);
return;
error:
diff -ur gateway-1.4.1.orig/test/wapproxy.c
gateway-1.4.1/test/wapproxy.c
--- gateway-1.4.1.orig/test/wapproxy.c 2005-04-01 15:04:12.000000000
+0100
+++ gateway-1.4.1/test/wapproxy.c 2008-06-30 16:16:10.000000000
+0100
@@ -99,7 +99,7 @@
#include "gwlib/gwlib.h"
#include "msg.h"
-//#include "bearerbox.h"
+/*#include "bearerbox.h"*/
#include "shared.h"
#include "wap/wap.h"
#include "wap/wtp.h"
diff -ur gateway-1.4.1.orig/wap/wsp_headers.c
gateway-1.4.1/wap/wsp_headers.c
--- gateway-1.4.1.orig/wap/wsp_headers.c 2005-10-24
16:43:06.000000000 +0100
+++ gateway-1.4.1/wap/wsp_headers.c 2008-06-30 16:15:12.000000000
+0100
@@ -1489,7 +1489,7 @@
{ WSP_HEADER_X_WAP_APPLICATION_ID, wsp_pack_integer_string, 0},
{ WSP_HEADER_CONTENT_ID, wsp_pack_text, 0},
{ WSP_HEADER_ENCODING_VERSION, wsp_pack_version_value, 0 }
- // DAVI { WSP_HEADER_SET_COOKIE, pack_version_value, 0 }
+ /* DAVI { WSP_HEADER_SET_COOKIE, pack_version_value, 0 } */
};
static Parameter *parm_create(Octstr *key, Octstr *value)
diff -ur gateway-1.4.1.orig/wap/wtls.h gateway-1.4.1/wap/wtls.h
--- gateway-1.4.1.orig/wap/wtls.h 2005-02-11 15:35:49.000000000
+0000
+++ gateway-1.4.1/wap/wtls.h 2008-06-30 16:11:34.000000000 +0100
@@ -66,7 +66,7 @@
typedef struct WTLSMachine WTLSMachine;
#include "gw/msg.h"
-//#include "gw/wapbox.h"
+/*#include "gw/wapbox.h"*/
#include "wap/wap_events.h"
#include "wap/wtls_pdu.h"
diff -ur gateway-1.4.1.orig/wap/wtls_pdu.h gateway-1.4.1/wap/wtls_pdu.h
--- gateway-1.4.1.orig/wap/wtls_pdu.h 2005-05-09 14:15:08.000000000
+0100
+++ gateway-1.4.1/wap/wtls_pdu.h 2008-06-30 16:14:48.000000000
+0100
@@ -294,7 +294,7 @@
} CipherSuite;
typedef struct cert_request {
- List *trusted_authorities; // List of KeyExchangeIds
+ List *trusted_authorities; /* List of KeyExchangeIds */
} CertificateRequest;
typedef struct cert_verify {
@@ -313,7 +313,7 @@
Octstr *session_id;
List *client_key_ids;
List *trusted_key_ids;
- List *ciphersuites; // list of CipherSuites
+ List *ciphersuites; /* list of CipherSuites */
List *comp_methods;
int snmode;
int krefresh;
diff -ur gateway-1.4.1.orig/wap/wtls_state-decl.h
gateway-1.4.1/wap/wtls_state-decl.h
--- gateway-1.4.1.orig/wap/wtls_state-decl.h 2005-02-11
15:35:49.000000000 +0000
+++ gateway-1.4.1/wap/wtls_state-decl.h 2008-06-30 16:14:01.000000000
+0100
@@ -300,14 +300,14 @@
EXCHANGE)
/* Unitdata arrival - non-identical ClientHello record */
-//ROW(EXCHANGE,
-// T_Unitdata_Ind,
-// clienthellos_are_identical(event->u.T_Unitdata_Ind.pdu_list,
wtls_machine->last_received_packet) != 1,
-// {
+/*ROW(EXCHANGE,*/
+/* T_Unitdata_Ind,*/
+/* clienthellos_are_identical(event->u.T_Unitdata_Ind.pdu_list,
wtls_machine->last_received_packet) != 1,*/
+/* {*/
/* So, this one's different. They must have changed their mind about
something, so try a CREATING again */
/* Do the necessary SEC_Create_Ind stuff */
-// },
-// CREATING)
+/* },*/
+/* CREATING)*/
/* Unitdata arrival - good packet */
ROW(EXCHANGE,
@@ -615,14 +615,14 @@
OPENING)
/* Unitdata received - ClientHello */
-//ROW(OPENING,
-// T_Unitdata_Ind,
-// packet_contains_clienthello
(event->u.T_Unitdata_Ind.pdu_list) == 0,
-// {
-///* Hmm, they're obviously not happy with something we discussed, so
let's head back to creating */
-///* Do the necessary SEC_Create_Ind stuff */
-//},
-// CREATING)
+/*ROW(OPENING,*/
+/* T_Unitdata_Ind,*/
+/* packet_contains_clienthello
(event->u.T_Unitdata_Ind.pdu_list) == 0,*/
+/* {*/
+/* Hmm, they're obviously not happy with something we discussed, so
let's head back to creating */
+/* Do the necessary SEC_Create_Ind stuff */
+/*},*/
+/* CREATING)*/
/* Unitdata received */
ROW(OPENING,