revert previous stuff
This commit is contained in:
parent
fd6c3251f8
commit
59145608c6
3 changed files with 12 additions and 10 deletions
|
@ -77,7 +77,8 @@ struct sipsub;
|
|||
|
||||
typedef int (sipevent_fork_h)(struct sipsub **subp, struct sipsub *osub,
|
||||
const struct sip_msg *msg, void *arg);
|
||||
typedef void (sipevent_notify_h)(const struct sip_msg *msg, void *arg);
|
||||
typedef void (sipevent_notify_h)(struct sip *sip, const struct sip_msg *msg,
|
||||
void *arg);
|
||||
|
||||
int sipevent_subscribe(struct sipsub **subp, struct sipevent_sock *sock,
|
||||
const char *uri, const char *from_name,
|
||||
|
|
|
@ -192,11 +192,13 @@ static void notify_handler(struct sipevent_sock *sock,
|
|||
(void)sip_dialog_update(sub->dlg, msg);
|
||||
}
|
||||
|
||||
(void)sip_treply(NULL, sip, msg, 200, "OK");
|
||||
|
||||
if (sub->refer_cseq >= 0 && !sub->id && pl_isset(&event.id)) {
|
||||
|
||||
(void)pl_strdup(&sub->id, &event.id);
|
||||
err = pl_strdup(&sub->id, &event.id);
|
||||
if (err) {
|
||||
(void)sip_treply(NULL, sip, msg, 500, strerror(err));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
re_printf("notify: %s (%r)\n", sipevent_substate_name(state.state),
|
||||
|
@ -217,11 +219,8 @@ static void notify_handler(struct sipevent_sock *sock,
|
|||
break;
|
||||
}
|
||||
|
||||
if (sub->terminated)
|
||||
return;
|
||||
|
||||
mem_ref(sub);
|
||||
sub->notifyh(msg, sub->arg);
|
||||
sub->notifyh(sip, msg, sub->arg);
|
||||
nrefs = mem_nrefs(sub);
|
||||
mem_deref(sub);
|
||||
|
||||
|
|
|
@ -29,10 +29,12 @@ enum {
|
|||
static int request(struct sipsub *sub, bool reset_ls);
|
||||
|
||||
|
||||
static void internal_notify_handler(const struct sip_msg *msg, void *arg)
|
||||
static void internal_notify_handler(struct sip *sip, const struct sip_msg *msg,
|
||||
void *arg)
|
||||
{
|
||||
(void)msg;
|
||||
(void)arg;
|
||||
|
||||
(void)sip_treply(NULL, sip, msg, 200, "OK");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue