|
@@ -30,6 +30,7 @@
|
|
#include "db_id.h"
|
|
#include "db_id.h"
|
|
#include "../../dprint.h"
|
|
#include "../../dprint.h"
|
|
#include "../../mem/mem.h"
|
|
#include "../../mem/mem.h"
|
|
|
|
+#include "../../pt.h"
|
|
#include "../../ut.h"
|
|
#include "../../ut.h"
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <string.h>
|
|
@@ -241,6 +242,7 @@ struct db_id* new_db_id(const str* url)
|
|
LM_ERR("error while parsing database URL: '%.*s' \n", url->len, url->s);
|
|
LM_ERR("error while parsing database URL: '%.*s' \n", url->len, url->s);
|
|
goto err;
|
|
goto err;
|
|
}
|
|
}
|
|
|
|
+ ptr->pid = my_pid();
|
|
|
|
|
|
return ptr;
|
|
return ptr;
|
|
|
|
|
|
@@ -274,6 +276,10 @@ unsigned char cmp_db_id(const struct db_id* id1, const struct db_id* id2)
|
|
}
|
|
}
|
|
if (strcasecmp(id1->host, id2->host)) return 0;
|
|
if (strcasecmp(id1->host, id2->host)) return 0;
|
|
if (strcmp(id1->database, id2->database)) return 0;
|
|
if (strcmp(id1->database, id2->database)) return 0;
|
|
|
|
+ if(id1->pid!=id2->pid) {
|
|
|
|
+ LM_WARN("identical DB URLs, but different DB connection pid\n");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|