Module: sip-router
Branch: master
Commit: e135452ce5292d590de415058c538e2acc4be652
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e135452…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Oct 4 19:14:28 2010 +0200
usrloc(s): s/_res/_reset/
_res is a macro defined in /usr/include/resolv.h and hence it
should never be used as variable name in the code (a single
include of resolv.h would break things).
---
modules_s/usrloc/ucontact.c | 19 ++++++++++++-------
modules_s/usrloc/ucontact.h | 17 +++++++++++------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/modules_s/usrloc/ucontact.c b/modules_s/usrloc/ucontact.c
index 566325a..6c6b2d7 100644
--- a/modules_s/usrloc/ucontact.c
+++ b/modules_s/usrloc/ucontact.c
@@ -220,9 +220,11 @@ void print_ucontact(FILE* _f, ucontact_t* _c)
/*
* Update ucontact structure in memory
*/
-int mem_update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e, qvalue_t _q, str*
_cid, int _cs,
- unsigned int _set, unsigned int _res, str* _ua, str* _recv,
- struct socket_info* sock, str* _inst)
+int mem_update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e,
+ qvalue_t _q, str* _cid, int _cs,
+ unsigned int _set, unsigned int _reset,
+ str* _ua, str* _recv,
+ struct socket_info* sock, str* _inst)
{
char* ptr;
@@ -335,7 +337,7 @@ int mem_update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e,
qvalue_t _
_c->q = _q;
_c->cseq = _cs;
_c->flags |= _set;
- _c->flags &= ~_res;
+ _c->flags &= ~_reset;
_c->sock = sock;
return 0;
@@ -581,8 +583,10 @@ int db_delete_ucontact(ucontact_t* _c)
/*
* Update ucontact with new values
*/
-int update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e, qvalue_t _q, str* _cid,
int _cs,
- unsigned int _set, unsigned int _res, str* _ua, str* _recv,
+int update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e,
+ qvalue_t _q, str* _cid, int _cs,
+ unsigned int _set, unsigned int _reset,
+ str* _ua, str* _recv,
struct socket_info* sock, str* _inst, int sid)
{
/* run callbacks for UPDATE event */
@@ -592,7 +596,8 @@ int update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e,
qvalue_t _q, s
/* we have to update memory in any case, but database directly
* only in db_mode 1 */
- if (mem_update_ucontact(_c, _u, aor, _e, _q, _cid, _cs, _set, _res, _ua, _recv, sock,
_inst) < 0) {
+ if (mem_update_ucontact(_c, _u, aor, _e, _q, _cid, _cs, _set, _reset,
+ _ua, _recv, sock, _inst) < 0) {
LOG(L_ERR, "update_ucontact(): Error while updating\n");
return -1;
}
diff --git a/modules_s/usrloc/ucontact.h b/modules_s/usrloc/ucontact.h
index c1a76e7..ca71b44 100644
--- a/modules_s/usrloc/ucontact.h
+++ b/modules_s/usrloc/ucontact.h
@@ -183,11 +183,16 @@ int db_delete_ucontact(ucontact_t* _c);
/*
* Update ucontact with new values without replication
*/
-typedef int (*update_ucontact_t)(ucontact_t* _c, str* _u, str* aor, time_t _e, qvalue_t
_q, str* _cid, int _cs,
- unsigned int _set, unsigned int _res, str* _ua, str* _recv,
- struct socket_info* sock, str* _inst, int sid);
-int update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e, qvalue_t _q, str* _cid,
int _cs,
- unsigned int _set, unsigned int _res, str* _ua, str* _recv,
- struct socket_info* sock, str* _inst, int sid);
+typedef int (*update_ucontact_t)(ucontact_t* _c, str* _u, str* aor, time_t _e,
+ qvalue_t _q, str* _cid, int _cs,
+ unsigned int _set, unsigned int _reset,
+ str* _ua, str* _recv,
+ struct socket_info* sock, str* _inst,
+ int sid);
+int update_ucontact(ucontact_t* _c, str* _u, str* aor, time_t _e, qvalue_t _q,
+ str* _cid, int _cs, unsigned int _set,
+ unsigned int _reset,
+ str* _ua, str* _recv,
+ struct socket_info* sock, str* _inst, int sid);
#endif /* UCONTACT_H */