Changeset 1275 for pjproject/trunk/pjnath/src/pjstun-srv-test/main.c
- Timestamp:
- May 15, 2007 10:42:56 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjstun-srv-test/main.c
r1054 r1275 79 79 pj_caching_pool cp; 80 80 pj_stun_server *srv; 81 pj_stun_usage *turn; 81 82 pj_status_t status; 82 83 83 while((c=pj_getopt_long(argc,argv, "r:u:p: hF", long_options, &opt_id))!=-1) {84 while((c=pj_getopt_long(argc,argv, "r:u:p:N:hF", long_options, &opt_id))!=-1) { 84 85 switch (c) { 85 86 case 'r': … … 132 133 133 134 status = pj_stun_turn_usage_create(srv, PJ_SOCK_DGRAM, NULL, 134 3478, NULL);135 3478, &turn); 135 136 if (status != PJ_SUCCESS) { 136 137 pj_stun_perror(THIS_FILE, "Unable to create bind usage", status); 137 138 return 1; 139 } 140 141 if (o.user_name && o.password) { 142 pj_stun_auth_cred cred; 143 pj_bzero(&cred, sizeof(cred)); 144 cred.type = PJ_STUN_AUTH_CRED_STATIC; 145 cred.data.static_cred.realm = pj_str(o.realm); 146 cred.data.static_cred.username = pj_str(o.user_name); 147 cred.data.static_cred.data_type = 0; 148 cred.data.static_cred.data = pj_str(o.password); 149 cred.data.static_cred.nonce = pj_str(o.nonce); 150 pj_stun_turn_usage_set_credential(turn, &cred); 138 151 } 139 152
Note: See TracChangeset
for help on using the changeset viewer.