Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102589
b: refs/heads/master
c: e15f880
h: refs/heads/master
i:
  102587: 705b9b1
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed May 19, 2008
1 parent bb43381 commit 629f805
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 236ae64063faf7d3398b4f9a889421b0d27a69d2
refs/heads/master: e15f880409c807bb589e9492263564e80f0de6e9
4 changes: 3 additions & 1 deletion trunk/net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ void tipc_subscr_report_overlap(struct subscription *sub,
return;
if (!must && !(sub->filter & TIPC_SUB_PORTS))
return;
subscr_send_event(sub, found_lower, found_upper, event, port_ref, node);

sub->event_cb(sub, found_lower, found_upper, event, port_ref, node);
}

/**
Expand Down Expand Up @@ -372,6 +373,7 @@ static void subscr_subscribe(struct tipc_subscr *s,
subscr_terminate(subscriber);
return;
}
sub->event_cb = subscr_send_event;
memcpy(&sub->evt.s, s, sizeof(struct tipc_subscr));
INIT_LIST_HEAD(&sub->subscription_list);
INIT_LIST_HEAD(&sub->nameseq_list);
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/tipc/subscr.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@
#ifndef _TIPC_SUBSCR_H
#define _TIPC_SUBSCR_H

struct subscription;

typedef void (*tipc_subscr_event) (struct subscription *sub,
u32 found_lower, u32 found_upper,
u32 event, u32 port_ref, u32 node);

/**
* struct subscription - TIPC network topology subscription object
* @seq: name sequence associated with subscription
* @timeout: duration of subscription (in ms)
* @filter: event filtering to be done for subscription
* @event_cb: routine invoked when a subscription event is detected
* @evt: template for events generated by subscription
* @subscription_list: adjacent subscriptions in subscriber's subscription list
* @nameseq_list: adjacent subscriptions in name sequence's subscription list
Expand All @@ -53,6 +60,7 @@ struct subscription {
struct tipc_name_seq seq;
u32 timeout;
u32 filter;
tipc_subscr_event event_cb;
struct tipc_event evt;
struct list_head subscription_list;
struct list_head nameseq_list;
Expand Down

0 comments on commit 629f805

Please sign in to comment.