summaryrefslogtreecommitdiff
blob: 22a1a96a09eb14ca6ac6ed1f1222470f0f10ca5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
--- openobex-apps-1.0.0/src/obex_put_common.c	2002-12-01 09:34:41.000000000 -0800
+++ openobex-apps-1.0.0-new/src/obex_put_common.c	2005-02-18 15:36:06.982711586 -0800
@@ -82,7 +82,7 @@
 			break;
 		
 		default:
-			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
+			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
 		}
 	}
 	if(!body)	{
@@ -123,7 +123,7 @@
 		OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
 		break;
 	default:
-		printf(__FUNCTION__ "() Denied %02x request\n", cmd);
+		printf("%s() Denied %02x request\n", __FUNCTION__, cmd);
 		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
 		break;
 	}
--- openobex-apps-1.0.0/src/obex_test_cable.h	2002-12-01 09:34:41.000000000 -0800
+++ openobex-apps-1.0.0-new/src/obex_test_cable.h	2005-02-18 15:45:44.153908603 -0800
@@ -38,7 +38,7 @@
 #include <openobex/obex.h>
 
 #ifdef CABLE_DEBUG
-#define CDEBUG(args...) printf(__FUNCTION__ "() " args)
+#define CDEBUG(args...) printf(args)
 #else
 #define CDEBUG(args...)
 #endif
--- openobex-apps-1.0.0/src/obex_test_client.c	2002-12-01 09:34:41.000000000 -0800
+++ openobex-apps-1.0.0-new/src/obex_test_client.c	2005-02-18 15:38:36.895308553 -0800
@@ -370,13 +370,13 @@
 
 	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
 		if(hi == OBEX_HDR_BODY)	{
-		printf(__FUNCTION__ "() Found body\n");
+		printf("%s() Found body\n",__FUNCTION__);
 			body = hv.bs;
 			body_len = hlen;
 			break;
 		}
 		else	{
-			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
+			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
 		}
 	}
 
--- openobex-apps-1.0.0/src/obex_test_server.c	2002-12-01 09:34:41.000000000 -0800
+++ openobex-apps-1.0.0-new/src/obex_test_server.c	2005-02-18 15:42:04.560119274 -0800
@@ -54,17 +54,17 @@
 	char *name = NULL;
 	char *namebuf = NULL;
 
-	printf(__FUNCTION__ "()\n");
+	printf("%s()\n",__FUNCTION__);
 
 	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
 		switch(hi)	{
 		case OBEX_HDR_BODY:
-			printf(__FUNCTION__ "() Found body\n");
+			printf("%s() Found body\n",__FUNCTION__);
 			body = hv.bs;
 			body_len = hlen;
 			break;
 		case OBEX_HDR_NAME:
-			printf(__FUNCTION__ "() Found name\n");
+			printf("%s() Found name\n",__FUNCTION__);
 			if( (namebuf = malloc(hlen / 2)))	{
 				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
 				name = namebuf;
@@ -72,7 +72,7 @@
 			break;
 		
 		default:
-			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
+			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
 		}
 	}
 	if(!body)	{
@@ -103,12 +103,12 @@
 	char *name = NULL;
 	char *namebuf = NULL;
 
-	printf(__FUNCTION__ "()\n");
+	printf("%s()\n",__FUNCTION__);
 
 	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
 		switch(hi)	{
 		case OBEX_HDR_NAME:
-			printf(__FUNCTION__ "() Found name\n");
+			printf("%s() Found name\n",__FUNCTION__);
 			if( (namebuf = malloc(hlen / 2)))	{
 				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
 				name = namebuf;
@@ -116,16 +116,16 @@
 			break;
 		
 		default:
-			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
+			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
 		}
 	}
 
 	if(!name)	{
-		printf(__FUNCTION__ "() Got a GET without a name-header!\n");
+		printf("%s() Got a GET without a name-header!\n",__FUNCTION__);
 		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND);
 		return;
 	}
-	printf(__FUNCTION__ "() Got a request for %s\n", name);
+	printf("%s() Got a request for %s\n", __FUNCTION__, name);
 
 	buf = easy_readfile(name, &file_size);
 	if(buf == NULL) {
@@ -154,7 +154,7 @@
 
 	const uint8_t *who = NULL;
 	int who_len = 0;
-	printf(__FUNCTION__ "()\n");
+	printf("%s()\n",__FUNCTION__);
 
 	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
 		if(hi == OBEX_HDR_WHO)	{
@@ -162,7 +162,7 @@
 			who_len = hlen;
 		}
 		else	{
-			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
+			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
 		}
 	}
 	if (who_len == 6)	{
@@ -199,7 +199,7 @@
 		OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
 		break;
 	default:
-		printf(__FUNCTION__ "() Denied %02x request\n", cmd);
+		printf("%s() Denied %02x request\n", __FUNCTION__, cmd);
 		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
 		break;
 	}
@@ -224,7 +224,7 @@
 		break;
 
 	default:
-		printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd);
+		printf("%s() Command (%02x) has now finished\n", __FUNCTION__, obex_cmd);
 		break;
 	}
 }