Quellcode durchsuchen

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).
Andrei Pelinescu-Onciul vor 15 Jahren
Ursprung
Commit
e135452ce5
2 geänderte Dateien mit 23 neuen und 13 gelöschten Zeilen
  1. 12 7
      modules_s/usrloc/ucontact.c
  2. 11 6
      modules_s/usrloc/ucontact.h

+ 12 - 7
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;
 	}

+ 11 - 6
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 */