Changeset 238 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_opt.c
- Timestamp:
- Feb 27, 2006 12:00:30 AM (18 years ago)
- Location:
- pjproject/trunk/pjsip/src/pjsua-lib
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_opt.c
r236 r238 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 #include "pjsua.h" 20 #include "getopt.h" 21 #include <stdlib.h> 19 #include <pjsua-lib/pjsua.h> 20 #include <pjsua-lib/getopt.h> 22 21 23 22 #define THIS_FILE "pjsua_opt.c" … … 190 189 return 0; 191 190 191 } 192 193 static int my_atoi(const char *cs) 194 { 195 pj_str_t s; 196 return pj_strtoul(pj_cstr(&s, cs)); 192 197 } 193 198 … … 459 464 460 465 case OPT_AUTO_ANSWER: 461 pjsua.auto_answer = atoi(optarg);466 pjsua.auto_answer = my_atoi(optarg); 462 467 if (pjsua.auto_answer < 100 || pjsua.auto_answer > 699) { 463 468 puts("Error: invalid code in --auto-answer (expecting 100-699"); … … 467 472 468 473 case OPT_MAX_CALLS: 469 pjsua.max_calls = atoi(optarg);474 pjsua.max_calls = my_atoi(optarg); 470 475 if (pjsua.max_calls < 1 || pjsua.max_calls > 255) { 471 476 puts("Too many calls for max-calls (1-255)");
Note: See TracChangeset
for help on using the changeset viewer.