From cc7a0e2e80cf3da3ff6cbef4f5674a285c5de537 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 4 Nov 2012 18:57:11 +0000 Subject: Call service start function if a particular domain service has been successfully registered. Export ds_conn_handle(). --- usr.sbin/ldomd/ds.c | 7 +++---- usr.sbin/ldomd/ds.h | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.sbin/ldomd') diff --git a/usr.sbin/ldomd/ds.c b/usr.sbin/ldomd/ds.c index c287bf66098..1941d261b8d 100644 --- a/usr.sbin/ldomd/ds.c +++ b/usr.sbin/ldomd/ds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ds.c,v 1.1 2012/10/27 18:34:03 kettenis Exp $ */ +/* $OpenBSD: ds.c,v 1.2 2012/11/04 18:57:10 kettenis Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -423,7 +423,6 @@ ds_rx_msg(struct ldc_conn *lc, void *data, size_t len) case DS_REG_REQ: { struct ds_reg_req *dr = data; - struct ds_conn *dc = lc->lc_cookie; struct ds_conn_svc *dcs; DPRINTF(("DS_REG_REQ %s %d.%d 0x%016llx\n", dr->svc_id, @@ -432,7 +431,8 @@ ds_rx_msg(struct ldc_conn *lc, void *data, size_t len) if (strcmp(dr->svc_id, dcs->service->ds_svc_id) == 0) { dcs->svc_handle = dr->svc_handle; dcs->ackid = lc->lc_tx_seqid; - ds_reg_ack(lc, dr->svc_handle); + ds_reg_ack(lc, dcs->svc_handle); + dcs->service->ds_start(lc, dcs->svc_handle); return; } } @@ -453,7 +453,6 @@ ds_rx_msg(struct ldc_conn *lc, void *data, size_t len) case DS_DATA: { struct ds_data *dd = data; - struct ds_conn *dc = lc->lc_cookie; struct ds_conn_svc *dcs; DPRINTF(("DS_DATA 0x%016llx\n", dd->svc_handle)); diff --git a/usr.sbin/ldomd/ds.h b/usr.sbin/ldomd/ds.h index f1758977234..a55c6d73922 100644 --- a/usr.sbin/ldomd/ds.h +++ b/usr.sbin/ldomd/ds.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ds.h,v 1.1 2012/10/27 18:34:03 kettenis Exp $ */ +/* $OpenBSD: ds.h,v 1.2 2012/11/04 18:57:10 kettenis Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -229,3 +229,4 @@ struct ds_conn { struct ds_conn *ds_conn_open(const char *, void *); void ds_conn_register_service(struct ds_conn *, struct ds_service *); void ds_conn_serve(void); +void ds_conn_handle(struct ds_conn *); -- cgit v1.2.3