Skip to main content
Sign in
Snippets Groups Projects
Select Git revision
  • 624e9810355fe313655fdaf278668622bf7fc53e
  • devel default protected
  • client-d
  • release-7.2 protected
  • master protected
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
  • 0.4.7
  • 0.4.6
  • 0.4.5
  • 0.4.4
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.10
  • 0.3.9
  • 0.3.8
  • 0.3.6
  • 0.3.5
  • 0.3.4
25 results

get.ts

Blame
  • astman.c 18.60 KiB
    /*
     * Asterisk -- An open source telephony toolkit.
     *
     * Copyright (C) 1999 - 2005, Digium, Inc.
     *
     * Mark Spencer <markster@digium.com>
     *
     * See http://www.asterisk.org for more information about
     * the Asterisk project. Please do not directly contact
     * any of the maintainers of this project for assistance;
     * the project provides a web site, mailing lists and IRC
     * channels for your use.
     *
     * This program is free software, distributed under the terms of
     * the GNU General Public License Version 2. See the LICENSE file
     * at the top of the source tree.
     */
    
    /*
     *
     * ASTerisk MANager
     *
     */
     
    #include "asterisk/autoconfig.h"
    
    #include <newt.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include <netdb.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <sys/socket.h>
    #include <sys/select.h>
    #include <fcntl.h>
    #include <string.h>
    #include <stdio.h>
    #include <errno.h>
    #include <unistd.h>
    #include <stdlib.h>
    
    #include "asterisk/md5.h"
    #include "asterisk/manager.h"
    #include "asterisk/linkedlists.h"
    
    #undef gethostbyname
    
    #define MAX_HEADERS 80
    #define MAX_LEN 256
    
    /*
     * 2005.05.27 - different versions of newt define the type of the buffer
     * for the 5th argument to newtEntry() as char ** or const char ** . To 
     * let the code compile cleanly with -Werror, we cast it to void * through 
     * _NEWT_CAST.
     */
    #define _NEWT_CAST (void *)
    
    static struct ast_mansession {
    	struct sockaddr_in sin;
    	int fd;
    	char inbuf[MAX_LEN];
    	int inlen;
    } session;
    
    struct ast_chan {
    	char name[80];
    	char exten[20];
    	char context[20];
    	char priority[20];