diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-05-23 12:48:37 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-05-23 12:48:37 +0000 |
commit | c880e90314f3b7a8c58c1ea19f86974a16375ad3 (patch) | |
tree | fd3c02b388ab560b4513073eb1d55a2f2f3da9e8 | |
parent | af08011b31b086a947f97ed22a46efb48fc70b19 (diff) |
Fix dialup/lan access service record mess
-rw-r--r-- | dund/main.c | 3 | ||||
-rw-r--r-- | dund/sdp.c | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/dund/main.c b/dund/main.c index 8c311763..249d6d7c 100644 --- a/dund/main.c +++ b/dund/main.c @@ -398,7 +398,7 @@ static struct option main_lopts[] = { { "msdun", 2, 0, 'X' }, { "activesync", 0, 0, 'a' }, { "mrouter", 1, 0, 'm' }, - { "dialup", 1, 0, 'u' }, + { "dialup", 0, 0, 'u' }, { 0, 0, 0, 0 } }; @@ -447,6 +447,7 @@ int main(int argc, char *argv[]) case 's': mode = LISTEN; + type = LANACCESS; break; case 'c': @@ -109,11 +109,19 @@ int dun_sdp_register(bdaddr_t *device, uint8_t channel, int type) svclass = sdp_list_append(NULL, &dun); sdp_set_service_classes(record, svclass); - if (type == LANACCESS || type == DIALUP) { + switch (type) { + case LANACCESS: sdp_uuid16_create(&profile[0].uuid, LAN_ACCESS_PROFILE_ID); profile[0].version = 0x0100; pfseq = sdp_list_append(NULL, &profile[0]); sdp_set_profile_descs(record, pfseq); + break; + case DIALUP: + sdp_uuid16_create(&profile[0].uuid, DIALUP_NET_PROFILE_ID); + profile[0].version = 0x0100; + pfseq = sdp_list_append(NULL, &profile[0]); + sdp_set_profile_descs(record, pfseq); + break; } switch (type) { |