#0 0x000000000040892c in binary_search (v=0x614840, key=1) at vector.c:149 144: int l,r,x; 145: l = 0; 146: r = v->size - 1; 147: while (r >= l) { 148: x = (l + r)/2; 149: if (key < v->item[x].key) r = x - 1; else l = x + 1; 150: if (key == v->item[x].key) return &(v->item[x]); 151: } 152: return NULL; 153: } 154: #1 0x00000000004088d8 in vector_contains (v=0x614840, key=1) at vector.c:138 133: 134: /*** vector_contains **********************************************************/ 135: int vector_contains(VECTOR *v, int key) 136: { 137: assert(v != NULL); 138: return (binary_search(v, key) != NULL); 139: } 140: 141: /*** vector_item **************************************************************/ 142: static struct vector_item *binary_search(VECTOR *v, int key) 143: { #2 0x000000000040540b in pptp_call_close (conn=0x614750, call=0x6128e0) at pptp_ctrl.c:388 383: { 384: struct pptp_call_clear_rqst rqst = { 385: PPTP_HEADER_CTRL(PPTP_CALL_CLEAR_RQST), 0, 0 386: }; 387: assert(conn && conn->call); assert(call); 388: assert(vector_contains(conn->call, call->call_id)); 389: /* haven't thought about PAC yet */ 390: assert(call->call_type == PPTP_CALL_PNS); 391: assert(call->state.pns != PNS_IDLE); 392: rqst.call_id = hton16(call->call_id); 393: /* don't check state against WAIT_DISCONNECT... allow multiple disconnect #3 0x000000000040ae85 in callmgr_main (argc=3, argv=0x7fff0ec8dd10, envp=0x7fff0ec8f158) at pptp_callmgr.c:256 251: /* kill all open calls */ 252: for (i = 0; i < vector_size(call_list); i++) { 253: PPTP_CALL *call = vector_get_Nth(call_list, i); 254: struct local_callinfo *lci = pptp_call_closure_get(conn, call); 255: log("Closing connection (shutdown)"); 256: pptp_call_close(conn, call); 257: if(lci->pid[0] > 1) kill(lci->pid[0], SIGTERM); 258: if(lci->pid[1] > 1) kill(lci->pid[1], SIGTERM); 259: } 260: /* attempt to dispatch these messages */ 261: FD_ZERO(&read_set); #4 0x0000000000402d52 in launch_callmgr (inetaddr={s_addr = 2789997777}, phonenr=0x0, argc=5, argv=0x7fff0ec8f128, envp=0x7fff0ec8f158) at pptp.c:446 441: { 442: char *my_argv[3] = { argv[0], inet_ntoa(inetaddr), phonenr }; 443: char buf[128]; 444: snprintf(buf, sizeof(buf), "pptp: call manager for %s", my_argv[1]); 445: inststr(argc, argv, envp, buf); 446: exit(callmgr_main(3, my_argv, envp)); 447: } 448: 449: /*** exchange data with the call manager *************************************/ 450: /* XXX need better error checking XXX */ 451: int get_call_id(int sock, pid_t gre, pid_t pppd, #5 0x0000000000402bc2 in open_callmgr (inetaddr={s_addr = 2789997777}, phonenr=0x0, argc=5, argv=0x7fff0ec8f128, envp=0x7fff0ec8f158, pty_fd=0, gre_fd=4) #6 0x00000000004027bc in main (argc=5, argv=0x7fff0ec8f128, envp=0x7fff0ec8f158) at pptp.c:328 323: 324: do { 325: /* 326: * Open connection to call manager (Launch call manager if necessary.) 327: */ 328: callmgr_sock = open_callmgr(inetaddr, phonenr, argc, argv, envp, 329: pty_fd, gre_fd); 330: /* Exchange PIDs, get call ID */ 331: } while (get_call_id(callmgr_sock, parent_pid, child_pid, 332: &call_id, &peer_call_id) < 0); 333: #7 0x00002b459c2568e4 in __libc_start_main () from /lib/libc.so.6 #8 0x0000000000401d89 in _start ()