* Find the hook with a given session ID. */
| 1215 | * Find the hook with a given session ID. |
| 1216 | */ |
| 1217 | static hpriv_p |
| 1218 | ng_pptpgre_find_session(priv_p privp, u_int16_t cid) |
| 1219 | { |
| 1220 | uint16_t hash = SESSHASH(cid); |
| 1221 | hpriv_p hpriv = NULL; |
| 1222 | |
| 1223 | LIST_FOREACH(hpriv, &privp->sesshash[hash], sessions) { |
| 1224 | if (hpriv->conf.cid == cid) |
| 1225 | break; |
| 1226 | } |
| 1227 | |
| 1228 | return (hpriv); |
| 1229 | } |
| 1230 | |
| 1231 | /* |
| 1232 | * Reset state (must be called with lock held or from writer) |
no outgoing calls
no test coverage detected