From 44847d5dfc0eebba1cebad1fbc89895901bfe09b Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 25 Apr 2007 22:14:22 +0000 Subject: Added UpdateServiceRecord --- sdpd/service.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sdpd/service.c') diff --git a/sdpd/service.c b/sdpd/service.c index 8c8c3a73..e469d841 100644 --- a/sdpd/service.c +++ b/sdpd/service.c @@ -297,19 +297,22 @@ int add_record_to_server(sdp_record_t *rec) return 0; } -void remove_record_from_server(uint32_t handle) +int remove_record_from_server(uint32_t handle) { sdp_record_t *rec; debug("Removing record with handle 0x%05x", handle); rec = sdp_record_find(handle); - if (rec) { - if (sdp_record_remove(handle) == 0) - update_db_timestamp(); + if (!rec) + return -ENOENT; - sdp_record_free(rec); - } + if (sdp_record_remove(handle) == 0) + update_db_timestamp(); + + sdp_record_free(rec); + + return 0; } // FIXME: refactor for server-side -- cgit