Skip to content
Snippets Groups Projects
Commit cedaf56c authored by Sergej Pupykin's avatar Sergej Pupykin
Browse files

opensips: clean up

parent 8174a594
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,6 @@ source=(https://opensips.org/pub/opensips/${pkgver}/opensips-${pkgver}.tar.gz
sha256sums=('54d5a24adbba0affc3c0f2cc7a5c8793d7c6cb9bf2df45ab665f260f20ccba89'
'c2fec4be085b108db10834fa9832e98d696c2de6408f85f96cf89c13bf6be819')
prepare() {
cd "$srcdir"/$pkgname-$pkgver/
}
_modules="db_http db_mysql db_postgres db_unixodbc h350 httpd ldap presence presence_xml proto_tls tls_mgm tls_openssl tm rr"
build() {
......
diff -upr opensips-3.1.2.orig/modules/ldap/ldap_api_fn.c opensips-3.1.2/modules/ldap/ldap_api_fn.c
--- opensips-3.1.2.orig/modules/ldap/ldap_api_fn.c 2021-05-06 17:40:16.000000000 +0300
+++ opensips-3.1.2/modules/ldap/ldap_api_fn.c 2021-11-13 22:51:36.709798951 +0200
@@ -118,7 +118,7 @@ struct ld_conn* get_ldap_connection(stru
return NULL;
}
- if (ldap_connect(lds->name, NULL) < 0) {
+ if (opensips_ldap_connect(lds->name, NULL) < 0) {
LM_ERR("failed to create new ldap connection!\n");
return NULL;
}
diff -upr opensips-3.1.2.orig/modules/ldap/ldap_connect.c opensips-3.1.2/modules/ldap/ldap_connect.c
--- opensips-3.1.2.orig/modules/ldap/ldap_connect.c 2021-05-06 17:40:16.000000000 +0300
+++ opensips-3.1.2/modules/ldap/ldap_connect.c 2021-11-13 22:51:36.709798951 +0200
@@ -113,7 +113,7 @@ error:
}
-int ldap_connect(char* _ld_name, struct ld_conn* conn)
+int opensips_ldap_connect(char* _ld_name, struct ld_conn* conn)
{
int rc;
int ldap_proto_version;
@@ -411,7 +411,7 @@ int ldap_reconnect(char* _ld_name, struc
return -1;
}
- if ((rc = ldap_connect(_ld_name, conn)) != 0)
+ if ((rc = opensips_ldap_connect(_ld_name, conn)) != 0)
{
LM_ERR("[%s]: reconnect failed\n",
_ld_name);
diff -upr opensips-3.1.2.orig/modules/ldap/ldap_connect.h opensips-3.1.2/modules/ldap/ldap_connect.h
--- opensips-3.1.2.orig/modules/ldap/ldap_connect.h 2021-05-06 17:40:16.000000000 +0300
+++ opensips-3.1.2/modules/ldap/ldap_connect.h 2021-11-13 22:51:38.336506198 +0200
@@ -43,7 +43,7 @@
/* forward declaration for this structure */
struct ld_conn;
-extern int ldap_connect(char* _ld_name, struct ld_conn* conn);
+extern int opensips_ldap_connect(char* _ld_name, struct ld_conn* conn);
extern int ldap_disconnect(char* _ld_name, struct ld_conn* conn);
extern int ldap_reconnect(char* _ld_name, struct ld_conn* conn);
extern int ldap_get_vendor_version(char** _version);
diff -upr opensips-3.1.2.orig/modules/ldap/ldap_mod.c opensips-3.1.2/modules/ldap/ldap_mod.c
--- opensips-3.1.2.orig/modules/ldap/ldap_mod.c 2021-05-06 17:40:16.000000000 +0300
+++ opensips-3.1.2/modules/ldap/ldap_mod.c 2021-11-13 22:51:36.709798951 +0200
@@ -186,7 +186,7 @@ static int child_init(int rank)
}
/* won't check for null in get_ld_session since it's barely been initialized */
- if (ldap_connect(ld_name, &get_ld_session(ld_name)->conn_s) != 0)
+ if (opensips_ldap_connect(ld_name, &get_ld_session(ld_name)->conn_s) != 0)
{
LM_ERR("[%s]: failed to connect to LDAP host(s)\n", ld_name);
ldap_disconnect(ld_name, NULL);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment