Mercurial > hg > freeDiameter
comparison libfdproto/messages.c @ 924:877592751fee
Fix (tentative) for invalid handling of sessions fast creation/destruction as pointed by Yusuke Okura -- http://lists.freediameter.net/pipermail/help/2013-February/000584.html and http://lists.freediameter.net/pipermail/help/2013-February/000589.html -- Thank you very much
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 14 Feb 2013 17:52:57 +0100 |
parents | cb439d57d0c5 |
children | 5053f1abcf5d f97fa305467f |
comparison
equal
deleted
inserted
replaced
923:6a4d08e239bd | 924:877592751fee |
---|---|
1213 | 1213 |
1214 memcpy(ts, &msg->msg_ts_sent, sizeof(struct timespec)); | 1214 memcpy(ts, &msg->msg_ts_sent, sizeof(struct timespec)); |
1215 return 0; | 1215 return 0; |
1216 } | 1216 } |
1217 | 1217 |
1218 /* Associate a session with a message, use only when the session was just created */ | |
1219 int fd_msg_sess_set(struct msg * msg, struct session * session) | |
1220 { | |
1221 TRACE_ENTRY("%p %p", msg, session); | |
1222 | |
1223 /* Check we received valid parameters */ | |
1224 CHECK_PARAMS( CHECK_MSG(msg) ); | |
1225 CHECK_PARAMS( session ); | |
1226 CHECK_PARAMS( msg->msg_sess == NULL ); | |
1227 | |
1228 msg->msg_sess = session; | |
1229 return 0; | |
1230 } | |
1231 | |
1218 | 1232 |
1219 /* Retrieve the session of the message */ | 1233 /* Retrieve the session of the message */ |
1220 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new) | 1234 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new) |
1221 { | 1235 { |
1222 struct avp * avp; | 1236 struct avp * avp; |