Changeset 1994
- Timestamp:
- Jun 6, 2008 11:10:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjturn-srv/auth.c
r1988 r1994 39 39 }; 40 40 41 #define THIS_FILE "auth.c" 41 42 #define THE_NONCE "pjnath" 43 #define LOG(expr) PJ_LOG(3,expr) 42 44 43 45 … … 97 99 PJ_UNUSED_ARG(pool); 98 100 99 if (pj_stricmp2(realm, g_realm)) 101 if (pj_stricmp2(realm, g_realm)) { 102 LOG((THIS_FILE, "auth error: invalid realm '%.*s'", 103 (int)realm->slen, realm->ptr)); 100 104 return PJ_EINVAL; 105 } 101 106 102 107 for (i=0; i<PJ_ARRAY_SIZE(g_cred); ++i) { … … 108 113 } 109 114 115 LOG((THIS_FILE, "auth error: user '%.*s' not found", 116 (int)username->slen, username->ptr)); 110 117 return PJ_ENOTFOUND; 111 118 } … … 127 134 PJ_UNUSED_ARG(username); 128 135 129 if (pj_stricmp2(nonce, THE_NONCE)) 136 if (pj_stricmp2(nonce, THE_NONCE)) { 137 LOG((THIS_FILE, "auth error: invalid nonce '%.*s'", 138 (int)nonce->slen, nonce->ptr)); 130 139 return PJ_FALSE; 140 } 131 141 132 142 return PJ_TRUE;
Note: See TracChangeset
for help on using the changeset viewer.