summaryrefslogtreecommitdiffstats
path: root/sdpd/service.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-10-01 11:40:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-10-01 11:40:15 +0000
commitc8c2b3ffa0c932033a5c666a49481122e58cec27 (patch)
treea168396ee8ffee03241b5b56a29a293f3067d51d /sdpd/service.c
parent6153da844acccec9519301e3e15743643c096e09 (diff)
Change dynamic assignment of record handles to a more standard one
Diffstat (limited to 'sdpd/service.c')
-rw-r--r--sdpd/service.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sdpd/service.c b/sdpd/service.c
index 0834122d..a8d93994 100644
--- a/sdpd/service.c
+++ b/sdpd/service.c
@@ -141,7 +141,10 @@ int service_register_req(sdp_req_t *req, sdp_buf_t *rsp)
return -1;
}
- rec->handle = (uint32_t)rec;
+ rec->handle = sdp_next_handle();
+ if (rec->handle < 0x10000)
+ return -1;
+
sdp_record_add(rec);
if (!(req->flags & SDP_RECORD_PERSIST))
sdp_svcdb_set_collectable(rec, req->sock);