src/subscription.c
/** delete subscription (filter and client match) */
delete subscription (filter and client match)
delete subscription ( filter and client match )
void sub_remove(trie_mult_node_st **phead, subscription_st *sp)
{
    unsigned char *used_filter = sp->filter;
    if (strncmp((char *)sp->filter, "$local/", 7) == 0) {
        used_filter += 7;
    }
    LOG_DEBUG("sub_delete %s", used_filter);
    trie_m_delete(phead, used_filter, &sp->sub_node);
}
void sub_remove ( trie_mult_node_st * * phead , subscription_st * sp ) { unsigned char * used_filter = sp -> filter ; if ( strncmp ( ( char * ) sp -> filter , " " , 7 ) == 0 ) { used_filter += 7 ; } LOG_DEBUG ( " " , used_filter ) ; trie_m_delete ( phead , used_filter , & sp -> sub_node ) ; }
delete subscription (filter and client match)
delete subscription ( filter and client match )
/* ignore $local/ prefix to be compatible with emqttd */