/*
 * HA_misc.cpp
 *
 */
#include <unistd.h>
#include <pthread.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#include "HA_misc.h"
#include "HA_log.h"
#include "android_hark.h"

int find_disappearance(const SOURCE_DATA_ARY_t &pre, const SOURCE_DATA_ARY_t &current, std::vector<int> &ids)
{

	for(int i = 0; i < pre.source_num; i++) {
		bool found(false);
		for(int j = 0; j < current.source_num; j++) {
			if (pre.data[i].id == current.data[j].id) {
				found = true;
				break;
			}
		}
		if (!found) {
			ids.push_back(pre.data[i].id);
		}
	}

	return(0);
}
