Changeset 5883 for pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
- Timestamp:
- Sep 7, 2018 2:56:38 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
r5809 r5883 104 104 } 105 105 106 static int print_oauth_credential(pjsip_oauth_credential *cred, char *buf, 107 pj_size_t size) 108 { 109 pj_ssize_t printed; 110 char *startbuf = buf; 111 char *endbuf = buf + size; 112 113 copy_advance_pair_quote_cond_always(buf, "token=", 6, cred->token, 114 '"', '"'); 115 copy_advance_pair_quote_cond_always(buf, ", username=", 11, cred->username, 116 '"', '"'); 117 copy_advance_pair_quote_cond_always(buf, ", realm=", 8, cred->realm, 118 '"', '"'); 119 120 return (int) (buf-startbuf); 121 } 122 106 123 static int pjsip_authorization_hdr_print( pjsip_authorization_hdr *hdr, 107 124 char *buf, pj_size_t size) … … 126 143 printed = print_pgp_credential(&hdr->credential.pgp, buf, endbuf - buf); 127 144 } 145 else if (pj_stricmp(&hdr->scheme, &pjsip_BEARER_STR) == 0) 146 { 147 printed = print_oauth_credential(&hdr->credential.oauth, buf, 148 endbuf - buf); 149 } 128 150 else { 129 151 pj_assert(0);
Note: See TracChangeset
for help on using the changeset viewer.