| | |
| | | if(bus_set != NULL) { |
| | | for(auto bus_iter = bus_set->begin(); bus_iter != bus_set->end(); bus_iter++) { |
| | | // printf("DModSocket desub_timeout before"); |
| | | // desub_timeout(NULL, 0, *bus_iter, &timeout); |
| | | desub_timeout(NULL, 0, *bus_iter, &timeout); |
| | | // printf("DModSocket desub_timeout after %d\n", *bus_iter); |
| | | } |
| | | delete bus_set; |
| | | } |
| | | |
| | | |
| | | // printf("DModSocket destory 2\n"); |
| | | if(topic_sub_map != NULL) { |
| | | for (map_iter = topic_sub_map->begin(); map_iter != topic_sub_map->end(); map_iter++) { |
| | |
| | | } |
| | | |
| | | } else if(strcmp(action, "desub") == 0) { |
| | | printf("desub topic=%s,%s,%d\n", topics, trim(topics, 0), strcmp(trim(topics, 0), "")); |
| | | // printf("desub topic=%s,%s,%d\n", topics, trim(topics, 0), strcmp(trim(topics, 0), "")); |
| | | if(strcmp(trim(topics, 0), "") == 0) { |
| | | // 取消所有订阅 |
| | | printf("====取消所有订阅\n"); |