Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 99091 | Differences between
and this patch

Collapse All | Expand All

(-)openobex-apps-1.0.0/src/obex_put_common.c (-2 / +2 lines)
Lines 82-88 Link Here
82
			break;
82
			break;
83
		
83
		
84
		default:
84
		default:
85
			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
85
			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
86
		}
86
		}
87
	}
87
	}
88
	if(!body)	{
88
	if(!body)	{
Lines 123-129 Link Here
123
		OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
123
		OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
124
		break;
124
		break;
125
	default:
125
	default:
126
		printf(__FUNCTION__ "() Denied %02x request\n", cmd);
126
		printf("%s() Denied %02x request\n", __FUNCTION__, cmd);
127
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
127
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
128
		break;
128
		break;
129
	}
129
	}
(-)openobex-apps-1.0.0/src/obex_test_cable.h (-1 / +1 lines)
Lines 38-44 Link Here
38
#include <openobex/obex.h>
38
#include <openobex/obex.h>
39
39
40
#ifdef CABLE_DEBUG
40
#ifdef CABLE_DEBUG
41
#define CDEBUG(args...) printf(__FUNCTION__ "() " args)
41
#define CDEBUG(args...) printf(args)
42
#else
42
#else
43
#define CDEBUG(args...)
43
#define CDEBUG(args...)
44
#endif
44
#endif
(-)openobex-apps-1.0.0/src/obex_test_client.c (-2 / +2 lines)
Lines 370-382 Link Here
370
370
371
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
371
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
372
		if(hi == OBEX_HDR_BODY)	{
372
		if(hi == OBEX_HDR_BODY)	{
373
		printf(__FUNCTION__ "() Found body\n");
373
		printf("%s() Found body\n",__FUNCTION__);
374
			body = hv.bs;
374
			body = hv.bs;
375
			body_len = hlen;
375
			body_len = hlen;
376
			break;
376
			break;
377
		}
377
		}
378
		else	{
378
		else	{
379
			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
379
			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
380
		}
380
		}
381
	}
381
	}
382
382
(-)openobex-apps-1.0.0/src/obex_test_server.c (-13 / +13 lines)
Lines 54-70 Link Here
54
	char *name = NULL;
54
	char *name = NULL;
55
	char *namebuf = NULL;
55
	char *namebuf = NULL;
56
56
57
	printf(__FUNCTION__ "()\n");
57
	printf("%s()\n",__FUNCTION__);
58
58
59
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
59
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
60
		switch(hi)	{
60
		switch(hi)	{
61
		case OBEX_HDR_BODY:
61
		case OBEX_HDR_BODY:
62
			printf(__FUNCTION__ "() Found body\n");
62
			printf("%s() Found body\n",__FUNCTION__);
63
			body = hv.bs;
63
			body = hv.bs;
64
			body_len = hlen;
64
			body_len = hlen;
65
			break;
65
			break;
66
		case OBEX_HDR_NAME:
66
		case OBEX_HDR_NAME:
67
			printf(__FUNCTION__ "() Found name\n");
67
			printf("%s() Found name\n",__FUNCTION__);
68
			if( (namebuf = malloc(hlen / 2)))	{
68
			if( (namebuf = malloc(hlen / 2)))	{
69
				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
69
				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
70
				name = namebuf;
70
				name = namebuf;
Lines 72-78 Link Here
72
			break;
72
			break;
73
		
73
		
74
		default:
74
		default:
75
			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
75
			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
76
		}
76
		}
77
	}
77
	}
78
	if(!body)	{
78
	if(!body)	{
Lines 103-114 Link Here
103
	char *name = NULL;
103
	char *name = NULL;
104
	char *namebuf = NULL;
104
	char *namebuf = NULL;
105
105
106
	printf(__FUNCTION__ "()\n");
106
	printf("%s()\n",__FUNCTION__);
107
107
108
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
108
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
109
		switch(hi)	{
109
		switch(hi)	{
110
		case OBEX_HDR_NAME:
110
		case OBEX_HDR_NAME:
111
			printf(__FUNCTION__ "() Found name\n");
111
			printf("%s() Found name\n",__FUNCTION__);
112
			if( (namebuf = malloc(hlen / 2)))	{
112
			if( (namebuf = malloc(hlen / 2)))	{
113
				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
113
				OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
114
				name = namebuf;
114
				name = namebuf;
Lines 116-131 Link Here
116
			break;
116
			break;
117
		
117
		
118
		default:
118
		default:
119
			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
119
			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
120
		}
120
		}
121
	}
121
	}
122
122
123
	if(!name)	{
123
	if(!name)	{
124
		printf(__FUNCTION__ "() Got a GET without a name-header!\n");
124
		printf("%s() Got a GET without a name-header!\n",__FUNCTION__);
125
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND);
125
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND);
126
		return;
126
		return;
127
	}
127
	}
128
	printf(__FUNCTION__ "() Got a request for %s\n", name);
128
	printf("%s() Got a request for %s\n", __FUNCTION__, name);
129
129
130
	buf = easy_readfile(name, &file_size);
130
	buf = easy_readfile(name, &file_size);
131
	if(buf == NULL) {
131
	if(buf == NULL) {
Lines 154-160 Link Here
154
154
155
	const uint8_t *who = NULL;
155
	const uint8_t *who = NULL;
156
	int who_len = 0;
156
	int who_len = 0;
157
	printf(__FUNCTION__ "()\n");
157
	printf("%s()\n",__FUNCTION__);
158
158
159
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
159
	while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))	{
160
		if(hi == OBEX_HDR_WHO)	{
160
		if(hi == OBEX_HDR_WHO)	{
Lines 162-168 Link Here
162
			who_len = hlen;
162
			who_len = hlen;
163
		}
163
		}
164
		else	{
164
		else	{
165
			printf(__FUNCTION__ "() Skipped header %02x\n", hi);
165
			printf("%s() Skipped header %02x\n", __FUNCTION__, hi);
166
		}
166
		}
167
	}
167
	}
168
	if (who_len == 6)	{
168
	if (who_len == 6)	{
Lines 199-205 Link Here
199
		OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
199
		OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
200
		break;
200
		break;
201
	default:
201
	default:
202
		printf(__FUNCTION__ "() Denied %02x request\n", cmd);
202
		printf("%s() Denied %02x request\n", __FUNCTION__, cmd);
203
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
203
		OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
204
		break;
204
		break;
205
	}
205
	}
Lines 224-230 Link Here
224
		break;
224
		break;
225
225
226
	default:
226
	default:
227
		printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd);
227
		printf("%s() Command (%02x) has now finished\n", __FUNCTION__, obex_cmd);
228
		break;
228
		break;
229
	}
229
	}
230
}
230
}

Return to bug 99091