Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 272751
Collapse All | Expand All

(-)opd.orig/main.c (-11 / +11 lines)
Lines 100-106 Link Here
100
//
100
//
101
//
101
//
102
//
102
//
103
sdp_record_t obex_record;
103
sdp_record_t *obex_record;
104
104
105
int add_opush(sdp_session_t *session)
105
int add_opush(sdp_session_t *session)
106
{
106
{
Lines 111-130 Link Here
111
	uint8_t u8 = srv_RFCommChannel;
111
	uint8_t u8 = srv_RFCommChannel;
112
	sdp_data_t *channel;
112
	sdp_data_t *channel;
113
113
114
	memset((void *)&obex_record, 0, sizeof(sdp_record_t));
114
	obex_record = sdp_record_alloc();
115
	obex_record.handle = 0xffffffff;
115
116
	sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
116
	sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
117
	root = sdp_list_append(0, &root_uuid);
117
	root = sdp_list_append(0, &root_uuid);
118
	sdp_set_browse_groups(&obex_record, root);
118
	sdp_set_browse_groups(obex_record, root);
119
119
120
	sdp_uuid16_create(&opush_uuid, OBEX_OBJPUSH_SVCLASS_ID);
120
	sdp_uuid16_create(&opush_uuid, OBEX_OBJPUSH_SVCLASS_ID);
121
	svclass_id = sdp_list_append(0, &opush_uuid);
121
	svclass_id = sdp_list_append(0, &opush_uuid);
122
	sdp_set_service_classes(&obex_record, svclass_id);
122
	sdp_set_service_classes(obex_record, svclass_id);
123
123
124
	sdp_uuid16_create(&profile[0].uuid, OBEX_OBJPUSH_PROFILE_ID);
124
	sdp_uuid16_create(&profile[0].uuid, OBEX_OBJPUSH_PROFILE_ID);
125
	profile[0].version = 0x0100;
125
	profile[0].version = 0x0100;
126
	pfseq = sdp_list_append(0, profile);
126
	pfseq = sdp_list_append(0, profile);
127
	sdp_set_profile_descs(&obex_record, pfseq);
127
	sdp_set_profile_descs(obex_record, pfseq);
128
128
129
	sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
129
	sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
130
	proto[0] = sdp_list_append(0, &l2cap_uuid);
130
	proto[0] = sdp_list_append(0, &l2cap_uuid);
Lines 141-147 Link Here
141
	apseq = sdp_list_append(apseq, proto[2]);
141
	apseq = sdp_list_append(apseq, proto[2]);
142
142
143
	aproto = sdp_list_append(0, apseq);
143
	aproto = sdp_list_append(0, apseq);
144
	sdp_set_access_protos(&obex_record, aproto);
144
	sdp_set_access_protos(obex_record, aproto);
145
	sdp_data_free(channel);
145
	sdp_data_free(channel);
146
	sdp_list_free(proto[0], 0);
146
	sdp_list_free(proto[0], 0);
147
	sdp_list_free(proto[1], 0);
147
	sdp_list_free(proto[1], 0);
Lines 149-155 Link Here
149
	sdp_list_free(apseq, 0);
149
	sdp_list_free(apseq, 0);
150
	sdp_list_free(aproto, 0);
150
	sdp_list_free(aproto, 0);
151
151
152
	sdp_set_info_attr(&obex_record, "OBEX Object Push", 0, 0);
152
	sdp_set_info_attr(obex_record, "OBEX Object Push", 0, 0);
153
153
154
154
155
155
Lines 169-175 Link Here
169
			values[i] = &formats [i];
169
			values[i] = &formats [i];
170
		}
170
		}
171
		seq = sdp_seq_alloc (dtds, values, sizeof (formats));
171
		seq = sdp_seq_alloc (dtds, values, sizeof (formats));
172
		sdp_attr_add(&obex_record, 0x303, seq);
172
		sdp_attr_add(obex_record, 0x303, seq);
173
173
174
174
175
		free (dtds);
175
		free (dtds);
Lines 179-185 Link Here
179
179
180
180
181
181
182
	if (0 > sdp_record_register(session, &obex_record, SDP_RECORD_PERSIST)) {
182
	if (0 > sdp_record_register(session, obex_record, SDP_RECORD_PERSIST)) {
183
		syslog(LOG_ERR,"OBEX Object Push Service Record registration failed with sdpd.\n");
183
		syslog(LOG_ERR,"OBEX Object Push Service Record registration failed with sdpd.\n");
184
		return -1;
184
		return -1;
185
	}
185
	}
Lines 351-357 Link Here
351
351
352
352
353
	if( srv_Modes & OPDM_OBEX ){
353
	if( srv_Modes & OPDM_OBEX ){
354
		ret = sdp_record_unregister(sess, &obex_record);
354
		ret = sdp_record_unregister(sess, obex_record);
355
	}
355
	}
356
356
357
	if( srv_Modes & OPDM_BIP ){
357
	if( srv_Modes & OPDM_BIP ){

Return to bug 272751