1
/* $Id: main.c 3553 2011-05-05 06:14:19Z nanang $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
extern const char *system_name;
29
puts("Usage: test-pjsip");
31
puts(" -i,--interractive Key input at the end.");
32
puts(" -h,--help Show this screen");
33
puts(" -l,--log-level N Set log level (0-6)");
36
int main(int argc, char *argv[])
44
/* Parse arguments. */
47
if (strcmp(*opt_arg, "-i") == 0 ||
48
strcmp(*opt_arg, "--interractive") == 0)
51
} else if (strcmp(*opt_arg, "-h") == 0 ||
52
strcmp(*opt_arg, "--help") == 0)
56
} else if (strcmp(*opt_arg, "-l") == 0 ||
57
strcmp(*opt_arg, "--log-level") == 0)
64
log_level = atoi(*opt_arg);
65
} else if (strcmp(*opt_arg, "-s") == 0 ||
66
strcmp(*opt_arg, "--system") == 0)
73
system_name = *opt_arg;
86
printf("<Press ENTER to quit>\n"); fflush(stdout);
87
if (fgets(s, sizeof(s), stdin) == NULL)